deps(c#): Update c# #270
Annotations
10 warnings
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
be/src/Entity/BlobResourceGetter.php#L25
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
* @param class-string<T> $protoBufClass
* @template T of Message
*/
- public static function protoBuf($value, string $protoBufClass) : ?array
+ protected static function protoBuf($value, string $protoBufClass) : ?array
{
if ($value === null) {
return null;
|
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
be/src/Entity/BlobResourceGetter.php#L42
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
if ($value === null) {
return null;
}
- rewind($value);
+
return stream_get_contents($value);
}
}
|
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
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(
|
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
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(
|
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
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')
|
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
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);
}
}
}
|
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
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();
|
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
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>
|
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
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)) {
|
Run ./vendor/bin/infection --coverage=coverage --skip-initial-tests:
be/src/PostsQuery/CursorCodec.php#L37
Escaped Mutant for Mutator "LessThan":
--- Original
+++ New
@@ @@
return '0';
}
$prefix = match (true) {
- \is_int($cursor) && $cursor < 0 => '-',
+ \is_int($cursor) && $cursor <= 0 => '-',
\is_string($cursor) => 'S',
default => '',
};
|
Loading