Skip to content

Commit

Permalink
use phpstan binary directly
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jun 11, 2022
1 parent 7ddc07a commit be65511
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pages/analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@

/** @var rex_addon $this */

if (is_callable(['rex_path', 'findBinaryPath'])) {
$phpBinary = rex_path::findBinaryPath('php');
} else {
$phpBinary = 'php';
}

$phpstanBinary = realpath(__DIR__.'/../vendor/bin/phpstan');
$configPath = realpath(__DIR__.'/../phpstan.neon');

$cmd = $phpBinary .' '. $phpstanBinary .' analyse -c '. $configPath .' --error-format=json --no-progress 2>&1';
$cmd = $phpstanBinary .' analyse -c '. $configPath .' --error-format=json --no-progress 2>&1';

$output = shell_exec($cmd);
if ($output[0] === '{') {
Expand Down

0 comments on commit be65511

Please sign in to comment.