Skip to content

Commit

Permalink
fix: work theme name trait
Browse files Browse the repository at this point in the history
  • Loading branch information
jevantang committed Feb 5, 2023
1 parent 7016c26 commit 45a8a9a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Commands/ThemePublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

class ThemePublishCommand extends Command
{
use Traits\WorkPluginNameTrait;
use Traits\WorkThemeNameTrait;

protected $signature = 'theme:publish {name}';

protected $description = 'Distribute static resources of the theme';

public function handle()
{
$themeName = $this->getPluginName();
$themeName = $this->getThemeName();
$theme = new Theme($themeName);

if (! $theme->isValidTheme()) {
Expand Down
6 changes: 3 additions & 3 deletions src/Commands/ThemeUninstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class ThemeUninstallCommand extends Command
{
use Traits\WorkPluginNameTrait;
use Traits\WorkThemeNameTrait;

protected $signature = 'theme:uninstall {name}
{--cleardata : Trigger clear theme data}';
Expand All @@ -24,10 +24,10 @@ class ThemeUninstallCommand extends Command
public function handle()
{
try {
$themeName = $this->getPluginName();
$themeName = $this->getThemeName();
$theme = new Theme($themeName);

if ($this->validatePluginRootPath($theme)) {
if ($this->validateThemeRootPath($theme)) {
$this->error('Failed to operate themes root path');

return Command::FAILURE;
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/ThemeUnpublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

class ThemeUnpublishCommand extends Command
{
use Traits\WorkPluginNameTrait;
use Traits\WorkThemeNameTrait;

protected $signature = 'theme:unpublish {name}';

protected $description = 'Distribute static resources of the theme';

public function handle()
{
$themeName = $this->getPluginName();
$themeName = $this->getThemeName();
$theme = new Theme($themeName);

if (! $theme->isValidTheme()) {
Expand Down

0 comments on commit 45a8a9a

Please sign in to comment.