Skip to content

Commit

Permalink
Move exit to binary script
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelstolt committed May 2, 2017
1 parent 4914750 commit 7e1a096
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion bin/pds-skeleton
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ if (! $autoload) {
require $autoload;

$console = new \Pds\Skeleton\Console();
$console->execute($argv);
$executeState = $console->execute($argv);
$executeState === true ? exit(0) : exit(1);
5 changes: 1 addition & 4 deletions src/ComplianceValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ public function execute($root = null)
$lines = $this->getFiles($root);
$results = $this->validate($lines);
$this->outputResults($results);
if ($this->getCompliant()) {
exit(0);
}
exit(1);
return $this->getCompliant();
}

public function getCompliant()
Expand Down

0 comments on commit 7e1a096

Please sign in to comment.