mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
more inspection fixes
This commit is contained in:
parent
d245e8d184
commit
8f161afcce
42
.github/workflows/main.yml
vendored
42
.github/workflows/main.yml
vendored
|
|
@ -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')"
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -306,9 +306,11 @@ final class PackageManager
|
|||
$cmd = $path;
|
||||
}
|
||||
|
||||
/*
|
||||
if ($cmd !== '') {
|
||||
// @todo implement
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user