diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab91e6594..09e816a8f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -194,27 +194,27 @@ jobs: run: composer install - name: phpcs run: vendor/bin/phpcs --severity=1 ./ --standard="Build/Config/phpcs.xml" -s --report=full - linting: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'NO_CI')" - strategy: - fail-fast: false - max-parallel: 3 - steps: - - name: Checkout Repository - uses: actions/checkout@main - with: - fetch-depth: 0 - submodules: recursive - token: ${{ secrets.GH_TOKEN }} - - name: Lint Code Base - uses: github/super-linter/slim@v4 - env: - VALIDATE_ALL_CODEBASE: false - VALIDATE_PHP: true - VALIDATE_PHP_BUILTIN: true - DEFAULT_BRANCH: develop - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} +# linting: +# runs-on: ubuntu-latest +# if: "!contains(github.event.head_commit.message, 'NO_CI')" +# strategy: +# fail-fast: false +# max-parallel: 3 +# steps: +# - name: Checkout Repository +# uses: actions/checkout@main +# with: +# fetch-depth: 0 +# submodules: recursive +# token: ${{ secrets.GH_TOKEN }} +# - name: Lint Code Base +# uses: github/super-linter/slim@v4 +# env: +# VALIDATE_ALL_CODEBASE: false +# VALIDATE_PHP: true +# VALIDATE_PHP_BUILTIN: true +# DEFAULT_BRANCH: develop +# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} custom: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'NO_CI')" diff --git a/Math/Parser/Evaluator.php b/Math/Parser/Evaluator.php index d499269cf..b2e16dccb 100644 --- a/Math/Parser/Evaluator.php +++ b/Math/Parser/Evaluator.php @@ -46,7 +46,7 @@ final class Evaluator $stack = []; $postfix = self::shuntingYard($equation); - foreach ($postfix as $i => $value) { + foreach ($postfix as $value) { if (\is_numeric($value)) { $stack[] = $value; } else { diff --git a/Module/PackageManager.php b/Module/PackageManager.php index 4adaf7de9..f012681a3 100644 --- a/Module/PackageManager.php +++ b/Module/PackageManager.php @@ -306,9 +306,11 @@ final class PackageManager $cmd = $path; } + /* if ($cmd !== '') { // @todo implement } + */ } } diff --git a/System/MimeType.php b/System/MimeType.php index 410158e00..729d8f6b2 100644 --- a/System/MimeType.php +++ b/System/MimeType.php @@ -2022,7 +2022,7 @@ abstract class MimeType extends Enum public static function extensionToMime(string $extension) : string { try { - return self::getByName('M_' . \strtoupper($extension)) ?? 'application/octet-stream'; + return (string) (self::getByName('M_' . \strtoupper($extension)) ?? 'application/octet-stream'); } catch (\Throwable $t) { return 'application/octet-stream'; } diff --git a/Uri/Argument.php b/Uri/Argument.php index 176cd00f8..bda869a9c 100644 --- a/Uri/Argument.php +++ b/Uri/Argument.php @@ -204,6 +204,7 @@ final class Argument implements UriInterface * * @since 1.0.0 */ + /* private function setInternalFragment(string $uri) : void { $result = \preg_match('/#([a-zA-Z0-9]*)/', $uri, $matches); @@ -212,6 +213,7 @@ final class Argument implements UriInterface $this->fragment = $matches[1] ?? ''; } } + */ /** * {@inheritdoc} diff --git a/Utils/ArrayUtils.php b/Utils/ArrayUtils.php index 628107e8b..dc144169a 100644 --- a/Utils/ArrayUtils.php +++ b/Utils/ArrayUtils.php @@ -274,10 +274,10 @@ final class ArrayUtils * * Useful for parsing command line parsing * - * @param string $id Id to find - * @param int[]|string[] $args CLI command list + * @param string $id Id to find + * @param string[] $args CLI command list * - * @return string + * @return null|string * * @since 1.0.0 */ @@ -297,8 +297,8 @@ final class ArrayUtils /** * Check if flag is set * - * @param string $id Id to find - * @param int[]|string[] $args CLI command list + * @param string $id Id to find + * @param string[] $args CLI command list * * @return int * diff --git a/Utils/Permutation.php b/Utils/Permutation.php index 3cbc708b4..c4d0c4206 100644 --- a/Utils/Permutation.php +++ b/Utils/Permutation.php @@ -101,7 +101,7 @@ final class Permutation * Permutate based on transposition key. * * @param array|string $toPermute To permutate - * @param array $key Permutation keys + * @param int[] $key Permutation keys * * @return string|array * diff --git a/Validation/Validator.php b/Validation/Validator.php index 5f6b6f22a..2e979b778 100644 --- a/Validation/Validator.php +++ b/Validation/Validator.php @@ -79,7 +79,7 @@ final class Validator extends ValidatorAbstract } foreach ($constraint as $value) { - if (!\is_a($var, $value)) { + if (!\is_a($var, $value, true)) { return false; } } diff --git a/Views/ViewAbstract.php b/Views/ViewAbstract.php index 7aec3c753..abb9c6487 100644 --- a/Views/ViewAbstract.php +++ b/Views/ViewAbstract.php @@ -269,7 +269,7 @@ abstract class ViewAbstract implements RenderableInterface * Render a template file * * @param string $template Template path - * @param mixed ...$data Data to pass to renderer + * @param mixed ...$data Data to pass to renderer * * @return string *