diff --git a/app/Domain/PackageAnalyser.php b/app/Domain/PackageAnalyser.php index 209bf31..f84e0c6 100644 --- a/app/Domain/PackageAnalyser.php +++ b/app/Domain/PackageAnalyser.php @@ -7,6 +7,7 @@ use App\Enum\ViolationStatus; use App\Exceptions\NonExistentPackageDirectory; use App\Exceptions\NonExistentStepId; +use Illuminate\Support\Arr; use Symfony\Component\Finder\Finder; class PackageAnalyser @@ -49,11 +50,8 @@ public function __construct(string $directoryToAnalyse) ['id' => 'cli-phar', 'summary' => 'Distribute CLI/TUI binaries via PHAR.', 'status' => ViolationStatus::Irrelevant], ['id' => 'composer-scripts', 'summary' => 'Utilise Composer scripts.', 'status' => ViolationStatus::False], ]; - $this->stepIds = []; - foreach ($this->steps as $step) { - $this->stepIds[] = $step['id']; - } + $this->stepIds = Arr::pluck($this->steps, 'id'); } /**