Skip to content

Commit

Permalink
update on few small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed May 8, 2024
1 parent b7bf252 commit 0bdae9e
Show file tree
Hide file tree
Showing 43 changed files with 157 additions and 192 deletions.
6 changes: 3 additions & 3 deletions src/AdminMenus/AdminMenuExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/**
* File that holds class for admin menu example.
*
* @package %namespace%\AdminMenus
* @package %g_namespace%\AdminMenus
*/

declare(strict_types=1);

namespace %namespace%\AdminMenus;
namespace %g_namespace%\AdminMenus;

use %useLibs%\AdminMenus\AbstractAdminMenu;
use %g_use_libs%\AdminMenus\AbstractAdminMenu;

/**
* AdminMenuExample class.
Expand Down
6 changes: 3 additions & 3 deletions src/AdminMenus/AdminReusableBlocksMenuExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/**
* File that holds class for admin menu example.
*
* @package %namespace%\AdminMenus
* @package %g_namespace%\AdminMenus
*/

declare(strict_types=1);

namespace %namespace%\AdminMenus;
namespace %g_namespace%\AdminMenus;

use %useLibs%\AdminMenus\AbstractAdminMenu;
use %g_use_libs%\AdminMenus\AbstractAdminMenu;

/**
* AdminReusableBlocksMenuExample class.
Expand Down
6 changes: 3 additions & 3 deletions src/AdminMenus/AdminSubMenuExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/**
* File that holds class for admin sub menu example.
*
* @package %namespace%\AdminMenus
* @package %g_namespace%\AdminMenus
*/

declare(strict_types=1);

namespace %namespace%\AdminMenus;
namespace %g_namespace%\AdminMenus;

use %useLibs%\AdminMenus\AbstractAdminSubMenu;
use %g_use_libs%\AdminMenus\AbstractAdminSubMenu;

/**
* AdminSubMenuExample class.
Expand Down
8 changes: 4 additions & 4 deletions src/AdminMenus/ReusableBlocksHeaderFooterExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
/**
* File that holds class for reusable blocks header/footer example.
*
* @package %namespace%\AdminMenus
* @package %g_namespace%\AdminMenus
*/

declare(strict_types=1);

namespace %namespace%\AdminMenus;
namespace %g_namespace%\AdminMenus;

use %useLibs%\AdminMenus\AbstractAdminMenu;
use %useLibs%\Helpers\Components;
use %g_use_libs%\AdminMenus\AbstractAdminMenu;
use %g_use_libs%\Helpers\Components;
use WP_Query;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/AnalyticsGdpr/AnalyticsGdprExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/**
* Class that adds Analytics and GDPR capability.
*
* @package %namespace%\AnalyticsGdpr
* @package %g_namespace%\AnalyticsGdpr
*/

declare(strict_types=1);

namespace %namespace%\AnalyticsGdpr;
namespace %g_namespace%\AnalyticsGdpr;

use %useLibs%\Services\ServiceInterface;
use %g_use_libs%\Services\ServiceInterface;

/**
* Class AnalyticsGdprExample
Expand Down
4 changes: 2 additions & 2 deletions src/BlockPatterns/BlockPatternExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

declare(strict_types=1);

namespace %namespace%\BlockPatterns;
namespace %g_namespace%\BlockPatterns;

use %useLibs%\BlockPatterns\AbstractBlockPattern;
use %g_use_libs%\BlockPatterns\AbstractBlockPattern;

/**
* BlockPatternExample class.
Expand Down
6 changes: 3 additions & 3 deletions src/Blocks/BlocksExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* Class Blocks is the base class for Gutenberg blocks registration.
* It provides the ability to register custom blocks using manifest.json.
*
* @package %namespace%\Blocks
* @package %g_namespace%\Blocks
*/

declare(strict_types=1);

namespace %namespace%\Blocks;
namespace %g_namespace%\Blocks;

use %useLibs%\Blocks\AbstractBlocks;
use %g_use_libs%\Blocks\AbstractBlocks;

/**
* Class Blocks
Expand Down
8 changes: 4 additions & 4 deletions src/Cache/ManifestCacheExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
/**
* The file that defines a project config details like prefix, absolute path and etc.
*
* @package %namespace%\Cache
* @package %g_namespace%\Cache
*/

declare(strict_types=1);

namespace %namespace%\Cache;
namespace %g_namespace%\Cache;

use %namespace%\Config\Config;
use %useLibs%\Cache\AbstractManifestCache;
use %g_namespace%\Config\Config;
use %g_use_libs%\Cache\AbstractManifestCache;

/**
* The project config class.
Expand Down
26 changes: 13 additions & 13 deletions src/Cli/AbstractCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,84 +62,84 @@ abstract class AbstractCli implements CliInterface
*
* @var string
*/
public const ARG_PROJECT_NAME = 'project_name';
public const ARG_PROJECT_NAME = 'g_project_name';

/**
* Output project description arg.
*
* @var string
*/
public const ARG_PROJECT_DESCRIPTION = 'project_description';
public const ARG_PROJECT_DESCRIPTION = 'g_project_description';

/**
* Output project author arg.
*
* @var string
*/
public const ARG_PROJECT_AUTHOR = 'project_author';
public const ARG_PROJECT_AUTHOR = 'g_project_author';

/**
* Output project author url arg.
*
* @var string
*/
public const ARG_PROJECT_AUTHOR_URL = 'project_author_url';
public const ARG_PROJECT_AUTHOR_URL = 'g_project_author_url';

/**
* Output project version arg.
*
* @var string
*/
public const ARG_PROJECT_VERSION = 'project_version';
public const ARG_PROJECT_VERSION = 'g_project_version';

/**
* Output textdomain arg.
*
* @var string
*/
public const ARG_TEXTDOMAIN = 'textdomain';
public const ARG_TEXTDOMAIN = 'g_textdomain';

/**
* Output composer_config_path arg.
*
* @var string
*/
public const ARG_COMPOSER_CONFIG_PATH = 'composer_config_path';
public const ARG_COMPOSER_CONFIG_PATH = 'g_composer_config_path';

/**
* Output skip existing arg.
*
* @var string
*/
public const ARG_SKIP_EXISTING = 'skip_existing';
public const ARG_SKIP_EXISTING = 'g_skip_existing';

/**
* Output site_url arg.
*
* @var string
*/
public const ARG_SITE_URL = 'site_url';
public const ARG_SITE_URL = 'g_site_url';

/**
* Output namespace arg.
*
* @var string
*/
public const ARG_NAMESPACE = 'namespace';
public const ARG_NAMESPACE = 'g_namespace';

/**
* Output namespace_vendor_prefix arg.
*
* @var string
*/
public const ARG_NAMESPACE_VENDOR_PREFIX = 'namespace_vendor_prefix';
public const ARG_NAMESPACE_VENDOR_PREFIX = 'g_namespace_vendor_prefix';

/**
* Output is setup arg.
*
* @var string
*/
public const ARG_IS_SETUP = 'is_setup';
public const ARG_IS_SETUP = 'g_is_setup';

/**
* Construct Method.
Expand Down Expand Up @@ -605,7 +605,7 @@ public function renameNamespace(array $args = []): self
public function renameUse(array $args = []): self
{
$this->fileContents = \str_replace(
'%useLibs%',
$this->getArgTemplate('g_use_libs'),
!\getenv('ES_TEST') ? $args[self::ARG_NAMESPACE_VENDOR_PREFIX] . "\EightshiftLibs" : 'EightshiftLibs',
$this->fileContents
);
Expand Down
8 changes: 4 additions & 4 deletions src/Columns/Media/WebPMediaColumnExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
/**
* File that holds class for WebP Media Column registration.
*
* @package %namespace%\CustomMeta
* @package %g_namespace%\CustomMeta
*/

declare(strict_types=1);

namespace %namespace%\Columns\Media;
namespace %g_namespace%\Columns\Media;

use %useLibs%\Columns\Media\AbstractMediaColumns;
use %useLibs%\Helpers\Components;
use %g_use_libs%\Columns\Media\AbstractMediaColumns;
use %g_use_libs%\Helpers\Components;

/**
* Class WebP Media Column.
Expand Down
6 changes: 3 additions & 3 deletions src/Config/ConfigPluginExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* A class definition that includes attributes and functions used across both the
* public side of the site and the admin area.
*
* @package %namespace%\Config
* @package %g_namespace%\Config
*/

declare(strict_types=1);

namespace %namespace%\Config;
namespace %g_namespace%\Config;

use %useLibs%\Helpers\Helpers;
use %g_use_libs%\Helpers\Helpers;

/**
* The project config class.
Expand Down
6 changes: 3 additions & 3 deletions src/Config/ConfigThemeExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* A class definition that includes attributes and functions used across both the
* public side of the site and the admin area.
*
* @package %namespace%\Config
* @package %g_namespace%\Config
*/

declare(strict_types=1);

namespace %namespace%\Config;
namespace %g_namespace%\Config;

use %useLibs%\Helpers\Helpers;
use %g_use_libs%\Helpers\Helpers;

/**
* The project config class.
Expand Down
6 changes: 3 additions & 3 deletions src/CustomMeta/AcfMetaExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/**
* File that holds class for AcfMetaExample custom meta registration.
*
* @package %namespace%\CustomMeta
* @package %g_namespace%\CustomMeta
*/

declare(strict_types=1);

namespace %namespace%\CustomMeta;
namespace %g_namespace%\CustomMeta;

use %useLibs%\CustomMeta\AbstractAcfMeta;
use %g_use_libs%\CustomMeta\AbstractAcfMeta;

/**
* Class AcfMetaExample.
Expand Down
6 changes: 3 additions & 3 deletions src/CustomPostType/PostTypeExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/**
* File that holds class for PostTypeExample custom post type registration.
*
* @package %namespace%\CustomPostType
* @package %g_namespace%\CustomPostType
*/

declare(strict_types=1);

namespace %namespace%\CustomPostType;
namespace %g_namespace%\CustomPostType;

use %useLibs%\CustomPostType\AbstractPostType;
use %g_use_libs%\CustomPostType\AbstractPostType;

/**
* Class PostTypeExample.
Expand Down
6 changes: 3 additions & 3 deletions src/CustomTaxonomy/TaxonomyExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
/**
* The Blog_Taxonomy specific functionality.
*
* @package %namespace%\CustomTaxonomy
* @package %g_namespace%\CustomTaxonomy
*/

declare(strict_types=1);

namespace %namespace%\CustomTaxonomy;
namespace %g_namespace%\CustomTaxonomy;

use %useLibs%\CustomTaxonomy\AbstractTaxonomy;
use %g_use_libs%\CustomTaxonomy\AbstractTaxonomy;

/**
* Class TaxonomyExample
Expand Down
8 changes: 4 additions & 4 deletions src/Enqueue/Admin/EnqueueAdminExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
/**
* The Admin Enqueue specific functionality.
*
* @package %namespace%\Enqueue\Admin
* @package %g_namespace%\Enqueue\Admin
*/

declare(strict_types=1);

namespace %namespace%\Enqueue\Admin;
namespace %g_namespace%\Enqueue\Admin;

use %namespace%\Config\Config;
use %useLibs%\Enqueue\Admin\AbstractEnqueueAdmin;
use %g_namespace%\Config\Config;
use %g_use_libs%\Enqueue\Admin\AbstractEnqueueAdmin;

/**
* Class EnqueueAdminExample
Expand Down
8 changes: 4 additions & 4 deletions src/Enqueue/Blocks/EnqueueBlocksExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
/**
* Enqueue class used to define all script and style enqueues for Gutenberg blocks.
*
* @package %namespace%\Enqueue\Blocks
* @package %g_namespace%\Enqueue\Blocks
*/

declare(strict_types=1);

namespace %namespace%\Enqueue\Blocks;
namespace %g_namespace%\Enqueue\Blocks;

use %namespace%\Config\Config;
use %useLibs%\Enqueue\Blocks\AbstractEnqueueBlocks;
use %g_namespace%\Config\Config;
use %g_use_libs%\Enqueue\Blocks\AbstractEnqueueBlocks;

/**
* Enqueue_Blocks class.
Expand Down
Loading

0 comments on commit 0bdae9e

Please sign in to comment.