Skip to content

Commit

Permalink
consolidation#497 Fix: Add Basic Self Update Functionality: Code Format
Browse files Browse the repository at this point in the history
  • Loading branch information
amenk committed Aug 30, 2017
1 parent bcbcce6 commit 4355350
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ public function addInitRoboFileCommand($roboFile, $roboClass)
$this->add($createRoboFile);
}

protected function addSelfUpdateCommand() {
$selfUpdateCommand = new SelfUpdateCommand( 'self:update', Robo::VERSION, 'consolidation/robo' );
$this->add( $selfUpdateCommand );
protected function addSelfUpdateCommand()
{
$selfUpdateCommand = new SelfUpdateCommand('self:update', Robo::VERSION, 'consolidation/robo');
$this->add($selfUpdateCommand);
}
}
8 changes: 5 additions & 3 deletions src/SelfUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ class SelfUpdateCommand extends Command

protected $currentVersion;

public function __construct( $name = null, $currentVersion = null, $gitHubRepository = null) {
parent::__construct( $name );
public function __construct($name = null, $currentVersion = null, $gitHubRepository = null)
{
parent::__construct($name);
$this->currentVersion = $currentVersion;
$this->gitHubRepository = $gitHubRepository;
}
Expand Down Expand Up @@ -79,7 +80,8 @@ protected function getLatestReleaseFromGithub()
return [ $version, $url ];
}

public function isEnabled() {
public function isEnabled()
{
return !empty(\Phar::running());
}

Expand Down

0 comments on commit 4355350

Please sign in to comment.