Skip to content

Commit

Permalink
More style cleanup in RoboFile.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Mar 22, 2016
1 parent 704782c commit 8025de0
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function (\ReflectionMethod $m) {
if ($m->isConstructor() || $m->isDestructor() || $m->isStatic()) {
return false;
}
return !in_array($m->name, ['run', '', '__call', 'getCommand', 'getPrinted']) and $m->isPublic(); // methods are not documented
return !in_array($m->name, ['run', '', '__call', 'getCommand', 'getPrinted']) && $m->isPublic(); // methods are not documented
}
)->processClassSignature(
function ($c) {
Expand Down Expand Up @@ -344,16 +344,6 @@ public function tryInteractive()
$this->_exec('php -r "echo php_sapi_name();"');
}

public function tryError()
{
$this->taskExec('ls xyzzy' . date('U'))->dir('/tmp')->run();
}

public function trySuccess()
{
$this->taskExec('pwd')->run();
}

/**
* Run the PHP Codesniffer on a file or directory.
*
Expand Down Expand Up @@ -382,9 +372,22 @@ public function sniff(
}
}

public function tryError()
{
$this->taskExec('ls xyzzy' . date('U'))->dir('/tmp')->run();
}

public function trySuccess()
{
$this->taskExec('pwd')->run();
}

public function tryDeprecated()
{
$result = (new \Robo\Task\Base\Exec('pwd'))->run();
// Calling 'new' directly without manually setting
// up dependencies will result in a deprecation warning.
// Use $this->task('Exec') or $this->taskExec() instead.
(new \Robo\Task\Base\Exec('pwd'))->run();
}

public function tryTmpDir()
Expand Down Expand Up @@ -417,7 +420,7 @@ public function tryTmpDir()
}

// Run the task collection
$result = $collection->run();
$collection->run();

if (is_dir($tmpPath)) {
$this->say("The temporary directory at $tmpPath was not cleaned up after the collection completed.");
Expand Down

0 comments on commit 8025de0

Please sign in to comment.