-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update configuration and tokens (#37)
- Loading branch information
Showing
10 changed files
with
43 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ bin/phpspec | |
bin | ||
app/console | ||
app/logs/ | ||
!config/example.yml | ||
config/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ | |
use Psr\Log\LoggerInterface; | ||
|
||
/** | ||
* Class Executor | ||
* | ||
* @author Nicolas Dupont <[email protected]> | ||
* @copyright 2016 Akeneo SAS (http://www.akeneo.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
|
@@ -19,24 +17,18 @@ class Executor | |
/** @var string */ | ||
protected $logFile; | ||
|
||
/** | ||
* @param LoggerInterface $logger | ||
* @param string $logFile | ||
*/ | ||
public function __construct(LoggerInterface $logger, $logFile) | ||
public function __construct(LoggerInterface $logger, string $logFile) | ||
{ | ||
$this->logger = $logger; | ||
$this->logFile = $this->getAbsolutePath($logFile); | ||
} | ||
|
||
/** | ||
* @param string $command | ||
* | ||
* @throws \Exception | ||
* | ||
* @return array | ||
*/ | ||
public function execute($command, $returnResult = false) | ||
public function execute(string $command, bool $returnResult = false) | ||
{ | ||
$returnVar = null; | ||
$output = []; | ||
|
@@ -74,12 +66,8 @@ public function execute($command, $returnResult = false) | |
|
||
/** | ||
* Allow user to put relative path, set it absolute from main directory. | ||
* | ||
* @param string $logFile | ||
* | ||
* @return string | ||
*/ | ||
protected function getAbsolutePath($logFile) | ||
protected function getAbsolutePath(string $logFile): string | ||
{ | ||
if (!preg_match('/^\//', $logFile)) { | ||
$logFile = sprintf('%s%s..%s..%s..%s%s', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters