Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

"require-dev": {
"phpunit/phpunit": "^10.1",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^2.2",
"phpmd/phpmd": "^2.15",
"squizlabs/php_codesniffer": "^4.0"
},
Expand Down
23 changes: 17 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Build.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(
/**
* For each task, ensure all requirements are met.
* @param array<int, string>|null $errors
* @SuppressWarnings(PHPMD.StaticAccess)
* @SuppressWarnings("PHPMD.StaticAccess")
*/
public function check(?array &$errors = null):int {
$count = 0;
Expand Down
10 changes: 6 additions & 4 deletions src/BuildRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(?string $path = null, ?Stream $stream = null) {
$this->stream = $stream;
}

/** @SuppressWarnings(PHPMD.ExitExpression) */
/** @SuppressWarnings("PHPMD.ExitExpression") */
public function run(
bool $continue = true,
?string $mode = null
Expand Down Expand Up @@ -66,7 +66,7 @@ protected function formatWorkingDirectory():string {
return rtrim($this->workingDirectory, "/\\");
}

/** @SuppressWarnings(PHPMD.ExitExpression) */
/** @SuppressWarnings("PHPMD.ExitExpression") */
protected function getJsonPath(string $workingDirectory):string {
$jsonPath = $this->resolveConfigPath($workingDirectory)
?? $this->resolveConfigPath($this->defaultPath);
Expand Down Expand Up @@ -112,7 +112,7 @@ protected function resolveConfigPath(string $path):?string {
}

/**
* @SuppressWarnings(PHPMD.ExitExpression)
* @SuppressWarnings("PHPMD.ExitExpression")
* @param array<int, string> $errors
*/
protected function checkRequirements(
Expand All @@ -134,7 +134,9 @@ protected function checkRequirements(
exit(1);
}

$build->check($errors);
$requirementErrors = $errors;
$build->check($requirementErrors);
$errors = $requirementErrors ?? [];
return $build;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Requirement.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function getVersionFromVersionString(string $string):string {
return $matches[1] ?? "0.0.0";
}

/** @SuppressWarnings(PHPMD.StaticAccess) */
/** @SuppressWarnings("PHPMD.StaticAccess") */
protected function isVersionStringValid(string $versionInstalled):bool {
if($this->version === "*") {
return true;
Expand Down
6 changes: 3 additions & 3 deletions src/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Task {
protected array $fileHashList = [];

/**
* @SuppressWarnings(PHPMD.StaticAccess)
* @SuppressWarnings("PHPMD.StaticAccess")
*/
public function __construct(
TaskBlock $taskBlock,
Expand All @@ -39,7 +39,7 @@ public function __construct(
}

public function __toString():string {
return $this->name ?? $this->execute->command;
return $this->name;
}

/** @param array<int, string>|null $errors */
Expand All @@ -57,7 +57,7 @@ public function check(?array &$errors = null):void {
}

/**
* @SuppressWarnings(PHPMD.StaticAccess)
* @SuppressWarnings("PHPMD.StaticAccess")
* @param array<int, string>|null $errors
*/
public function build(?array &$errors = null):bool {
Expand Down
Loading