Skip to content

* fix passing empty entities by denormalize the array with props valu… #197

* fix passing empty entities by denormalize the array with props valu…

* fix passing empty entities by denormalize the array with props valu… #197

Triggered via push October 9, 2024 22:24
Status Failure
Total duration 7m 46s
Artifacts 2

be.yml

on: push
Matrix: runs-on
Fit to window
Zoom out
Zoom in

Annotations

74 errors and 47 warnings
runs-on (ubuntu-latest) / phpstan: src/Controller/AssetController.php#L30
AssetController.php: binaryOp.invalid: Binary operation "." between array|bool|float|int|string|null and non-falsy-string results in an error.
runs-on (ubuntu-latest) / phpstan: src/Controller/ForumsController.php#L13
ForumsController.php: missingType.iterableValue: Method App\Controller\ForumsController::query() return type has no value type specified in iterable type array.
runs-on (ubuntu-latest) / phpstan: src/Controller/PostsController.php#L49
PostsController.php: missingType.iterableValue: Method App\Controller\PostsController::query() return type has no value type specified in iterable type array.
runs-on (ubuntu-latest) / phpstan: src/Controller/PostsController.php#L61
PostsController.php: method.nonObject: Cannot call method setParams() on mixed.
runs-on (ubuntu-latest) / phpstan: src/Controller/PostsController.php#L61
PostsController.php: argument.type: Parameter #1 $json of function Safe\json_decode expects string, string|null given.
runs-on (ubuntu-latest) / phpstan: src/Controller/PostsController.php#L78
PostsController.php: method.nonObject: Cannot call method addDefaultParamsThenValidate() on mixed.
runs-on (ubuntu-latest) / phpstan: src/Controller/PostsController.php#L91
PostsController.php: argument.templateType: Unable to resolve the template type TConcatValue in call to method Illuminate\Support\Collection<*NEVER*,*NEVER*>::concat()
runs-on (ubuntu-latest) / phpstan: src/Controller/PostsController.php#L92
PostsController.php: argument.type: Parameter #1 $source of method Illuminate\Support\Collection<*NEVER*,*NEVER*>::concat() expects iterable<(int|string), mixed>, mixed given.
runs-on (ubuntu-latest) / phpstan: src/Controller/PostsController.php#L97
PostsController.php: argument.type: Parameter #1 $source of method Illuminate\Support\Collection<*NEVER*,mixed>::concat() expects iterable<(int|string), mixed>, mixed given.
runs-on (ubuntu-latest) / phpstan: src/Controller/PostsController.php#L103
PostsController.php: argument.type: Parameter #1 $callback of method Illuminate\Support\Collection<string,array<string, int>|Illuminate\Support\Collection<int, App\Entity\Post\Reply>|Illuminate\Support\Collection<int, App\Entity\Post\SubReply>|Illuminate\Support\Collection<int, App\Entity\Post\Thread>|int>::flatMap() expects callable(array{thread: int, reply: int, subReply?: int}|Illuminate\Support\Collection<int, App\Entity\Post\Reply>|Illuminate\Support\Collection<int, App\Entity\Post\SubReply>|Illuminate\Support\Collection<int, App\Entity\Post\Thread>|int, string): (array<int, int>|Illuminate\Support\Collection<int, int>), Closure(Illuminate\Support\Collection): Illuminate\Support\Collection<int, int> given.
runs-on (ubuntu-latest) / phan: config/preload.php#L4
preload.php: PhanMissingRequireFile: Missing required file "/home/runner/work/open-tbm/open-tbm/be/var/cache/prod/App_KernelProdContainer.preload.php"
runs-on (ubuntu-latest) / phan: src/Entity/LatestReplier.php#L56
LatestReplier.php: PhanCompatibleStandaloneType: Cannot use null as a standalone type before php 8.2.
runs-on (ubuntu-latest) / phan: src/Entity/Post/Content/PostContent.php#L23
PostContent.php: PhanCompatibleStandaloneType: Cannot use null as a standalone type before php 8.2.
runs-on (ubuntu-latest) / phan: src/Entity/Post/Reply.php#L80
Reply.php: PhanCompatibleStandaloneType: Cannot use null as a standalone type before php 8.2.
runs-on (ubuntu-latest) / phan: src/Entity/Post/Thread.php#L149
Thread.php: PhanCompatibleStandaloneType: Cannot use null as a standalone type before php 8.2.
runs-on (ubuntu-latest) / phan: src/Entity/Post/Thread.php#L162
Thread.php: PhanCompatibleStandaloneType: Cannot use null as a standalone type before php 8.2.
runs-on (ubuntu-latest) / phan: src/Entity/User.php#L57
User.php: PhanCompatibleStandaloneType: Cannot use null as a standalone type before php 8.2.
runs-on (ubuntu-latest) / phan: src/Entity/User.php#L110
User.php: PhanCompatibleStandaloneType: Cannot use null as a standalone type before php 8.2.
runs-on (ubuntu-latest) / phan: src/PostsQuery/BaseQuery.php#L291
BaseQuery.php: PhanNonClassMethodCall: Call to method values on non-class type string
runs-on (ubuntu-latest) / phan: src/PostsQuery/BaseQuery.php#L296
BaseQuery.php: PhanNonClassMethodCall: Call to method filter on non-class type string
runs-on (ubuntu-latest) / psalm: src/Controller/AssetController.php#L11
AssetController.php: UnusedClass: Class App\Controller\AssetController is never used
runs-on (ubuntu-latest) / psalm: src/Controller/AssetController.php#L30
AssetController.php: PossiblyNullOperand: Cannot concatenate with a possibly null UnitEnum|array<array-key, mixed>|null|scalar
runs-on (ubuntu-latest) / psalm: src/Controller/ForumsController.php#L9
ForumsController.php: UnusedClass: Class App\Controller\ForumsController is never used
runs-on (ubuntu-latest) / psalm: src/Controller/PostsController.php#L31
PostsController.php: UnusedClass: Class App\Controller\PostsController is never used
runs-on (ubuntu-latest) / psalm: src/Controller/PostsController.php#L61
PostsController.php: MixedArgument: Argument 1 of App\PostsQuery\ParamsValidator::setParams cannot be mixed, expecting array<array-key, array<array-key, mixed>>
runs-on (ubuntu-latest) / psalm: src/Controller/PostsController.php#L61
PostsController.php: PossiblyNullArgument: Argument 1 of Safe\json_decode cannot be null, possibly null value provided
runs-on (ubuntu-latest) / psalm: src/Controller/PostsController.php#L92
PostsController.php: MixedArgument: Argument 1 of Illuminate\Support\Collection::concat cannot be mixed, expecting iterable<array-key, mixed>
runs-on (ubuntu-latest) / psalm: src/Controller/PostsController.php#L93
PostsController.php: QueryBuilderSetParameter: To improve performance set explicit type for objects
runs-on (ubuntu-latest) / psalm: src/Controller/PostsController.php#L97
PostsController.php: MixedArgument: Argument 1 of Illuminate\Support\Collection::concat cannot be mixed, expecting iterable<array-key, mixed>
runs-on (ubuntu-latest) / psalm: src/Controller/PostsController.php#L98
PostsController.php: QueryBuilderSetParameter: To improve performance set explicit type for objects
runs-on (ubuntu-latest) / phpmd: src/PostsQuery/SearchQuery.php#L193
SearchQuery.php: The method applyTextMatchParamOnQuery uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (ElseExpression, Clean Code Rules)
runs-on (ubuntu-latest) / phpmd: tests/PostsQuery/BaseQueryTest.php#L48
BaseQueryTest.php: The method testReOrderNestedPosts uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (ElseExpression, Clean Code Rules)
runs-on (ubuntu-latest) / phpmd
Process completed with exit code 2.
runs-on (windows-latest) / phan
Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension. To enable extensions, verify that they are enabled in your .ini files: - C:\tools\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-intl` to temporarily ignore these required extensions.
runs-on (windows-latest) / phan
Process completed with exit code 2.
runs-on (windows-latest) / phpcs
Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension. To enable extensions, verify that they are enabled in your .ini files: - C:\tools\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-intl` to temporarily ignore these required extensions.
runs-on (windows-latest) / phpcs
Process completed with exit code 2.
runs-on (windows-latest) / phpmd
Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension. To enable extensions, verify that they are enabled in your .ini files: - C:\tools\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-intl` to temporarily ignore these required extensions.
runs-on (windows-latest) / phpmd
Process completed with exit code 2.
runs-on (windows-latest) / phpunit-infection
Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension. To enable extensions, verify that they are enabled in your .ini files: - C:\tools\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-intl` to temporarily ignore these required extensions.
runs-on (windows-latest) / phpunit-infection
Process completed with exit code 2.
runs-on (windows-latest) / phpunit-infection
Process completed with exit code 1.
runs-on (windows-latest) / psalm
Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension. To enable extensions, verify that they are enabled in your .ini files: - C:\tools\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-intl` to temporarily ignore these required extensions.
runs-on (windows-latest) / psalm
Process completed with exit code 2.
runs-on (windows-latest) / phpstan
Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension. To enable extensions, verify that they are enabled in your .ini files: - C:\tools\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-intl` to temporarily ignore these required extensions.
runs-on (windows-latest) / phpstan
Process completed with exit code 2.
runs-on (windows-latest) / pint
Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension. To enable extensions, verify that they are enabled in your .ini files: - C:\tools\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-intl` to temporarily ignore these required extensions.
runs-on (windows-latest) / pint
Process completed with exit code 2.
runs-on (windows-latest) / php-cs-fixer
Your lock file does not contain a compatible set of packages. Please run composer update. Problem 1 - Root composer.json requires PHP extension ext-intl * but it is missing from your system. Install or enable PHP's intl extension. To enable extensions, verify that they are enabled in your .ini files: - C:\tools\php\php.ini You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode. Alternatively, you can run Composer with `--ignore-platform-req=ext-intl` to temporarily ignore these required extensions.
runs-on (windows-latest) / php-cs-fixer
Process completed with exit code 2.
runs-on (macos-latest) / phan
Process completed with exit code 1.
runs-on (macos-latest) / phpmd: src/PostsQuery/SearchQuery.php#L193
SearchQuery.php: The method applyTextMatchParamOnQuery uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (ElseExpression, Clean Code Rules)
runs-on (macos-latest) / phpmd: tests/PostsQuery/BaseQueryTest.php#L48
BaseQueryTest.php: The method testReOrderNestedPosts uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (ElseExpression, Clean Code Rules)
runs-on (macos-latest) / phpmd
Process completed with exit code 2.
runs-on (macos-latest) / phpstan: src/Controller/AssetController.php#L30
AssetController.php: binaryOp.invalid: Binary operation "." between array|bool|float|int|string|null and non-falsy-string results in an error.
runs-on (macos-latest) / phpstan: src/Controller/ForumsController.php#L13
ForumsController.php: missingType.iterableValue: Method App\Controller\ForumsController::query() return type has no value type specified in iterable type array.
runs-on (macos-latest) / phpstan: src/Controller/PostsController.php#L49
PostsController.php: missingType.iterableValue: Method App\Controller\PostsController::query() return type has no value type specified in iterable type array.
runs-on (macos-latest) / phpstan: src/Controller/PostsController.php#L61
PostsController.php: method.nonObject: Cannot call method setParams() on mixed.
runs-on (macos-latest) / phpstan: src/Controller/PostsController.php#L61
PostsController.php: argument.type: Parameter #1 $json of function Safe\json_decode expects string, string|null given.
runs-on (macos-latest) / phpstan: src/Controller/PostsController.php#L78
PostsController.php: method.nonObject: Cannot call method addDefaultParamsThenValidate() on mixed.
runs-on (macos-latest) / phpstan: src/Controller/PostsController.php#L91
PostsController.php: argument.templateType: Unable to resolve the template type TConcatValue in call to method Illuminate\Support\Collection<*NEVER*,*NEVER*>::concat()
runs-on (macos-latest) / phpstan: src/Controller/PostsController.php#L92
PostsController.php: argument.type: Parameter #1 $source of method Illuminate\Support\Collection<*NEVER*,*NEVER*>::concat() expects iterable<(int|string), mixed>, mixed given.
runs-on (macos-latest) / phpstan: src/Controller/PostsController.php#L97
PostsController.php: argument.type: Parameter #1 $source of method Illuminate\Support\Collection<*NEVER*,mixed>::concat() expects iterable<(int|string), mixed>, mixed given.
runs-on (macos-latest) / phpstan: src/Controller/PostsController.php#L103
PostsController.php: argument.type: Parameter #1 $callback of method Illuminate\Support\Collection<string,array<string, int>|Illuminate\Support\Collection<int, App\Entity\Post\Reply>|Illuminate\Support\Collection<int, App\Entity\Post\SubReply>|Illuminate\Support\Collection<int, App\Entity\Post\Thread>|int>::flatMap() expects callable(array{thread: int, reply: int, subReply?: int}|Illuminate\Support\Collection<int, App\Entity\Post\Reply>|Illuminate\Support\Collection<int, App\Entity\Post\SubReply>|Illuminate\Support\Collection<int, App\Entity\Post\Thread>|int, string): (array<int, int>|Illuminate\Support\Collection<int, int>), Closure(Illuminate\Support\Collection): Illuminate\Support\Collection<int, int> given.
runs-on (macos-latest) / psalm: src/Controller/AssetController.php#L11
AssetController.php: UnusedClass: Class App\Controller\AssetController is never used
runs-on (macos-latest) / psalm: src/Controller/AssetController.php#L30
AssetController.php: PossiblyNullOperand: Cannot concatenate with a possibly null UnitEnum|array<array-key, mixed>|null|scalar
runs-on (macos-latest) / psalm: src/Controller/ForumsController.php#L9
ForumsController.php: UnusedClass: Class App\Controller\ForumsController is never used
runs-on (macos-latest) / psalm: src/Controller/PostsController.php#L31
PostsController.php: UnusedClass: Class App\Controller\PostsController is never used
runs-on (macos-latest) / psalm: src/Controller/PostsController.php#L61
PostsController.php: MixedArgument: Argument 1 of App\PostsQuery\ParamsValidator::setParams cannot be mixed, expecting array<array-key, array<array-key, mixed>>
runs-on (macos-latest) / psalm: src/Controller/PostsController.php#L61
PostsController.php: PossiblyNullArgument: Argument 1 of Safe\json_decode cannot be null, possibly null value provided
runs-on (macos-latest) / psalm: src/Controller/PostsController.php#L92
PostsController.php: MixedArgument: Argument 1 of Illuminate\Support\Collection::concat cannot be mixed, expecting iterable<array-key, mixed>
runs-on (macos-latest) / psalm: src/Controller/PostsController.php#L93
PostsController.php: QueryBuilderSetParameter: To improve performance set explicit type for objects
runs-on (macos-latest) / psalm: src/Controller/PostsController.php#L97
PostsController.php: MixedArgument: Argument 1 of Illuminate\Support\Collection::concat cannot be mixed, expecting iterable<array-key, mixed>
runs-on (macos-latest) / psalm: src/Controller/PostsController.php#L98
PostsController.php: QueryBuilderSetParameter: To improve performance set explicit type for objects
runs-on (ubuntu-latest) / phan: public/index.php#L7
index.php: PhanUnreferencedClosure: Possibly zero references to Closure(array $context)
runs-on (ubuntu-latest) / phan: src/Controller/AssetController.php#L11
AssetController.php: PhanUnreferencedClass: Possibly zero references to class \App\Controller\AssetController
runs-on (ubuntu-latest) / phan: src/Controller/AssetController.php#L21
AssetController.php: PhanUnreferencedPublicMethod: Possibly zero references to public method \App\Controller\AssetController::getAsset()
runs-on (ubuntu-latest) / phan: src/Controller/AssetController.php#L24
AssetController.php: PhanPartialTypeMismatchArgument: Argument 1 ($content) is preg_replace_callback_array(['#/npm/(?&lt;filename&gt;\\w+)@(\\d+\\.?){3}/\\+esm#'=&gt;(fn),'@^//# sourceMappingURL=.+$@m'=&gt;(fn)], $this-&gt;filesystem-&gt;readFile(($this-&gt;getParameter('kernel.project_dir') . "/public/react-json-view/{$filename}"))) of type string|string[] but \Symfony\Component\HttpFoundation\Response::__construct() takes ?string (string[] is incompatible) defined at vendor/symfony/http-foundation/Response.php:200
runs-on (ubuntu-latest) / phan: src/Controller/AssetController.php#L26
AssetController.php: PhanTypeMismatchArgumentInternal: Argument 1 ($pattern) is ['#/npm/(?&lt;filename&gt;\\w+)@(\\d+\\.?){3}/\\+esm#'=&gt;(fn),'@^//# sourceMappingURL=.+$@m'=&gt;(fn)] of type array{\x23/npm/\x28\x3f\x3cfilename\x3e\\w+\x29\x40\x28\\d+\\.\x3f\x29\x7b3\x7d/\\+esm\x23:Closure(array):string,\x40^//\x23\x20sourceMappingURL\x3d.+$\x40m:Closure():''} but \preg_replace_callback_array() takes array&lt;string,callable(array):string&gt;
runs-on (ubuntu-latest) / phan: src/Controller/AssetController.php#L26
AssetController.php: PhanUnreferencedClosure: Possibly zero references to Closure(array $m)
runs-on (ubuntu-latest) / phan: src/Controller/AssetController.php#L28
AssetController.php: PhanUnreferencedClosure: Possibly zero references to Closure()
runs-on (ubuntu-latest) / phan: src/Controller/ForumsController.php#L9
ForumsController.php: PhanUnreferencedClass: Possibly zero references to class \App\Controller\ForumsController
runs-on (ubuntu-latest) / phan: src/Controller/ForumsController.php#L14
ForumsController.php: PhanUnreferencedPublicMethod: Possibly zero references to public method \App\Controller\ForumsController::query()
runs-on (ubuntu-latest) / phan: src/Controller/PostsController.php#L31
PostsController.php: PhanUnreferencedClass: Possibly zero references to class \App\Controller\PostsController
runs-on (ubuntu-latest) / phpmd: src/Controller/PostsController.php#L31
PostsController.php: The class PostsController has a coupling between objects value of 25. Consider to reduce the number of dependencies under 13. (CouplingBetweenObjects, Design Rules)
runs-on (ubuntu-latest) / phpmd: src/PostsQuery/BaseQuery.php#L20
BaseQuery.php: The class BaseQuery has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13. (CouplingBetweenObjects, Design Rules)
runs-on (ubuntu-latest) / phpmd: src/PostsQuery/IndexQuery.php#L27
IndexQuery.php: The method query() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. (CyclomaticComplexity, Code Size Rules)
runs-on (ubuntu-latest) / phpmd: src/PostsQuery/IndexQuery.php#L27
IndexQuery.php: The method query() has an NPath complexity of 200. The configured NPath complexity threshold is 200. (NPathComplexity, Code Size Rules)
runs-on (ubuntu-latest) / phpmd: src/PostsQuery/SearchQuery.php#L64
SearchQuery.php: The method applyQueryParamsOnQuery() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. (CyclomaticComplexity, Code Size Rules)
runs-on (ubuntu-latest) / phpmd: src/PostsQuery/SearchQuery.php#L64
SearchQuery.php: The method applyQueryParamsOnQuery() has an NPath complexity of 384. The configured NPath complexity threshold is 200. (NPathComplexity, Code Size Rules)
runs-on (ubuntu-latest) / phpmd: src/PostsQuery/SearchQuery.php#L64
SearchQuery.php: The method applyQueryParamsOnQuery() has 111 lines of code. Current threshold is set to 100. Avoid really long methods. (ExcessiveMethodLength, Code Size Rules)
runs-on (ubuntu-latest) / phpmd: tests/PostsQuery/BaseQueryTest.php#L53
BaseQueryTest.php: The method provideReOrderNestedPostsData() has 168 lines of code. Current threshold is set to 100. Avoid really long methods. (ExcessiveMethodLength, Code Size Rules)
runs-on (ubuntu-latest) / phpunit-infection: be/src/Entity/BlobResourceGetter.php#L44
Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ if ($value === null) { return null; } - rewind($value); + return stream_get_contents($value); } }
runs-on (ubuntu-latest) / phpunit-infection: be/src/EventListener/ExceptionToJsonResponse.php#L21
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ public function __invoke(ExceptionEvent $event) : void { $exception = $event->getThrowable(); - if ($exception instanceof HttpException && collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { + if (true && collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { $event->setResponse(JsonResponse::fromJsonString($exception->getMessage())); } elseif ($exception instanceof ValidationFailedException) { $event->setResponse(JsonResponse::fromJsonString(
runs-on (ubuntu-latest) / phpunit-infection: be/src/EventListener/ExceptionToJsonResponse.php#L21
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ public function __invoke(ExceptionEvent $event) : void { $exception = $event->getThrowable(); - if ($exception instanceof HttpException && collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { + if ($exception instanceof HttpException || collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { $event->setResponse(JsonResponse::fromJsonString($exception->getMessage())); } elseif ($exception instanceof ValidationFailedException) { $event->setResponse(JsonResponse::fromJsonString(
runs-on (ubuntu-latest) / phpunit-infection: be/src/EventListener/ExceptionToJsonResponse.php#L26
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ $exception = $event->getThrowable(); if ($exception instanceof HttpException && collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { $event->setResponse(JsonResponse::fromJsonString($exception->getMessage())); - } elseif ($exception instanceof ValidationFailedException) { + } elseif (true) { $event->setResponse(JsonResponse::fromJsonString( // https://github.com/symfony/serializer/blob/7.1/Normalizer/ConstraintViolationListNormalizer.php $this->serializer->serialize(['errorCode' => 40000, 'errorInfo' => $exception->getViolations()], 'json')
runs-on (ubuntu-latest) / phpunit-infection: be/src/EventListener/PrettyJsonResponse.php#L16
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ { // https://github.com/laravel/framework/issues/3929#issuecomment-935123918 $response = $event->getResponse(); - if ($response instanceof JsonResponse) { + if (true) { $response->setEncodingOptions(JSON_PRETTY_PRINT); } } }
runs-on (ubuntu-latest) / phpunit-infection: be/src/EventListener/ShowReactJsonView.php#L20
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ { $request = $event->getRequest(); $response = $event->getResponse(); - if (!$response instanceof JsonResponse || !in_array('text/html', $request->getAcceptableContentTypes(), true)) { + if (!true || !in_array('text/html', $request->getAcceptableContentTypes(), true)) { return; } $json = $response->getContent();
runs-on (ubuntu-latest) / phpunit-infection: be/src/EventListener/ShowReactJsonView.php#L20
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ { $request = $event->getRequest(); $response = $event->getResponse(); - if (!$response instanceof JsonResponse || !in_array('text/html', $request->getAcceptableContentTypes(), true)) { + if (!$response instanceof JsonResponse && !in_array('text/html', $request->getAcceptableContentTypes(), true)) { return; } $json = $response->getContent();
runs-on (ubuntu-latest) / phpunit-infection: be/src/EventListener/ShowReactJsonView.php#L25
Escaped Mutant for Mutator "MBString": --- Original +++ New @@ @@ return; } $json = $response->getContent(); - $jsonLength = mb_strlen($json); + $jsonLength = strlen($json); $assetsUrl = collect(['react-json-view', 'react', 'react-dom'])->mapWithKeys(fn($asset) => [$asset => $this->assets->getUrl("/assets/{$asset}.js")]); $event->setResponse(new Response(<<<HTML <html>
runs-on (ubuntu-latest) / phpunit-infection: be/src/Helper.php#L85
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ ]; public static function abortAPI(int $errorCode) : never { - $statusCode = 0; + $statusCode = -1; $errorInfo = null; foreach (self::ERROR_STATUS_CODE_INFO as $infoStatusCode => $infoErrorInfo) { if (\array_key_exists($errorCode, $infoErrorInfo)) {
runs-on (ubuntu-latest) / phpunit-infection: be/src/PostsQuery/BaseQuery.php#L297
Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ // use the topmost value between sorting key or value of orderBy field within its child posts $curAndChildSortingKeys = collect([ // value of orderBy field in the first sorted child post that isMatchQuery after previous sorting - $childPosts->filter(static fn(Collection $p) => ($p['isMatchQuery'] ?? true) === true)->first()[$this->orderByField] ?? null, + $childPosts->filter(static fn(Collection $p) => (true ?? $p['isMatchQuery']) === true)->first()[$this->orderByField] ?? null, // sorting key from the first sorted child posts // not requiring isMatchQuery since a child post without isMatchQuery // might have its own child posts with isMatchQuery
runs-on (windows-latest) / phpunit-infection
No files were found with the provided path: be/coverage/clover.xml. No artifacts will be uploaded.
runs-on (macos-latest) / phpmd: src/Controller/PostsController.php#L31
PostsController.php: The class PostsController has a coupling between objects value of 25. Consider to reduce the number of dependencies under 13. (CouplingBetweenObjects, Design Rules)
runs-on (macos-latest) / phpmd: src/PostsQuery/BaseQuery.php#L20
BaseQuery.php: The class BaseQuery has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13. (CouplingBetweenObjects, Design Rules)
runs-on (macos-latest) / phpmd: src/PostsQuery/IndexQuery.php#L27
IndexQuery.php: The method query() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. (CyclomaticComplexity, Code Size Rules)
runs-on (macos-latest) / phpmd: src/PostsQuery/IndexQuery.php#L27
IndexQuery.php: The method query() has an NPath complexity of 200. The configured NPath complexity threshold is 200. (NPathComplexity, Code Size Rules)
runs-on (macos-latest) / phpmd: src/PostsQuery/SearchQuery.php#L64
SearchQuery.php: The method applyQueryParamsOnQuery() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10. (CyclomaticComplexity, Code Size Rules)
runs-on (macos-latest) / phpmd: src/PostsQuery/SearchQuery.php#L64
SearchQuery.php: The method applyQueryParamsOnQuery() has an NPath complexity of 384. The configured NPath complexity threshold is 200. (NPathComplexity, Code Size Rules)
runs-on (macos-latest) / phpmd: src/PostsQuery/SearchQuery.php#L64
SearchQuery.php: The method applyQueryParamsOnQuery() has 111 lines of code. Current threshold is set to 100. Avoid really long methods. (ExcessiveMethodLength, Code Size Rules)
runs-on (macos-latest) / phpmd: tests/PostsQuery/BaseQueryTest.php#L53
BaseQueryTest.php: The method provideReOrderNestedPostsData() has 168 lines of code. Current threshold is set to 100. Avoid really long methods. (ExcessiveMethodLength, Code Size Rules)
runs-on (macos-latest) / phpunit-infection: be/src/Entity/BlobResourceGetter.php#L44
Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ if ($value === null) { return null; } - rewind($value); + return stream_get_contents($value); } }
runs-on (macos-latest) / phpunit-infection: be/src/EventListener/ExceptionToJsonResponse.php#L21
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ public function __invoke(ExceptionEvent $event) : void { $exception = $event->getThrowable(); - if ($exception instanceof HttpException && collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { + if (true && collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { $event->setResponse(JsonResponse::fromJsonString($exception->getMessage())); } elseif ($exception instanceof ValidationFailedException) { $event->setResponse(JsonResponse::fromJsonString(
runs-on (macos-latest) / phpunit-infection: be/src/EventListener/ExceptionToJsonResponse.php#L21
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ public function __invoke(ExceptionEvent $event) : void { $exception = $event->getThrowable(); - if ($exception instanceof HttpException && collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { + if ($exception instanceof HttpException || collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { $event->setResponse(JsonResponse::fromJsonString($exception->getMessage())); } elseif ($exception instanceof ValidationFailedException) { $event->setResponse(JsonResponse::fromJsonString(
runs-on (macos-latest) / phpunit-infection: be/src/EventListener/ExceptionToJsonResponse.php#L26
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ $exception = $event->getThrowable(); if ($exception instanceof HttpException && collect(Helper::ERROR_STATUS_CODE_INFO)->flatMap(static fn(array $codes) => array_keys($codes))->contains($exception->getCode())) { $event->setResponse(JsonResponse::fromJsonString($exception->getMessage())); - } elseif ($exception instanceof ValidationFailedException) { + } elseif (true) { $event->setResponse(JsonResponse::fromJsonString( // https://github.com/symfony/serializer/blob/7.1/Normalizer/ConstraintViolationListNormalizer.php $this->serializer->serialize(['errorCode' => 40000, 'errorInfo' => $exception->getViolations()], 'json')
runs-on (macos-latest) / phpunit-infection: be/src/EventListener/PrettyJsonResponse.php#L16
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ { // https://github.com/laravel/framework/issues/3929#issuecomment-935123918 $response = $event->getResponse(); - if ($response instanceof JsonResponse) { + if (true) { $response->setEncodingOptions(JSON_PRETTY_PRINT); } } }
runs-on (macos-latest) / phpunit-infection: be/src/EventListener/ShowReactJsonView.php#L20
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ { $request = $event->getRequest(); $response = $event->getResponse(); - if (!$response instanceof JsonResponse || !in_array('text/html', $request->getAcceptableContentTypes(), true)) { + if (!true || !in_array('text/html', $request->getAcceptableContentTypes(), true)) { return; } $json = $response->getContent();
runs-on (macos-latest) / phpunit-infection: be/src/EventListener/ShowReactJsonView.php#L20
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ { $request = $event->getRequest(); $response = $event->getResponse(); - if (!$response instanceof JsonResponse || !in_array('text/html', $request->getAcceptableContentTypes(), true)) { + if (!$response instanceof JsonResponse && !in_array('text/html', $request->getAcceptableContentTypes(), true)) { return; } $json = $response->getContent();
runs-on (macos-latest) / phpunit-infection: be/src/EventListener/ShowReactJsonView.php#L25
Escaped Mutant for Mutator "MBString": --- Original +++ New @@ @@ return; } $json = $response->getContent(); - $jsonLength = mb_strlen($json); + $jsonLength = strlen($json); $assetsUrl = collect(['react-json-view', 'react', 'react-dom'])->mapWithKeys(fn($asset) => [$asset => $this->assets->getUrl("/assets/{$asset}.js")]); $event->setResponse(new Response(<<<HTML <html>
runs-on (macos-latest) / phpunit-infection: be/src/Helper.php#L85
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ ]; public static function abortAPI(int $errorCode) : never { - $statusCode = 0; + $statusCode = -1; $errorInfo = null; foreach (self::ERROR_STATUS_CODE_INFO as $infoStatusCode => $infoErrorInfo) { if (\array_key_exists($errorCode, $infoErrorInfo)) {
runs-on (macos-latest) / phpunit-infection: be/src/PostsQuery/BaseQuery.php#L297
Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ // use the topmost value between sorting key or value of orderBy field within its child posts $curAndChildSortingKeys = collect([ // value of orderBy field in the first sorted child post that isMatchQuery after previous sorting - $childPosts->filter(static fn(Collection $p) => ($p['isMatchQuery'] ?? true) === true)->first()[$this->orderByField] ?? null, + $childPosts->filter(static fn(Collection $p) => (true ?? $p['isMatchQuery']) === true)->first()[$this->orderByField] ?? null, // sorting key from the first sorted child posts // not requiring isMatchQuery since a child post without isMatchQuery // might have its own child posts with isMatchQuery

Artifacts

Produced during runtime
Name Size
coverage-macos-latest
6.84 KB
coverage-ubuntu-latest
6.84 KB