Skip to content

Commit

Permalink
2.3.x refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
flancer64 committed Dec 17, 2018
1 parent 4c4ca68 commit 2258819
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions App/Cli/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ public function __construct($name, $desc)

/**
* Check area code in commands that require code to be set.
* This method should be used in 'execute()' methods (not in'configure()')
* to prevent " Area code is already set" error on "setup:upgrade".
*/
private function checkAreaCode()
protected function checkAreaCode()
{
/**
* I don't use constructor arguments to get dependencies
Expand All @@ -41,10 +43,4 @@ private function checkAreaCode()
$manObj->configure($config);
}
}

protected function configure()
{
parent::configure();
$this->checkAreaCode();
}
}

0 comments on commit 2258819

Please sign in to comment.