deps(fe): Lock file maintenance fe #181
Annotations
12 warnings
|
|
be/app/Eloquent/ModelWithTableNameSplitByFid.php#L14
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function setFid(int $fid) : static
{
$this->fid = $fid;
- $this->setTable($this->getTableNameWithFid($fid));
+
return $this;
}
protected abstract function getTableNameWithFid(int $fid) : string;
|
be/app/Eloquent/Model/Post/Post.php#L31
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
use ModelHasPublicField;
protected const array TIMESTAMP_FIELDS = ['createdAt', 'updatedAt', 'lastSeenAt'];
private const array MODEL_CLASS_TO_TABLE_NAME_SUFFIX = [Thread::class => 'thread', Reply::class => 'reply', ReplyContent::class => 'reply_content', SubReply::class => 'subReply', SubReplyContent::class => 'subReply_content'];
- protected function getTableNameSuffix() : string
+ private function getTableNameSuffix() : string
{
return self::MODEL_CLASS_TO_TABLE_NAME_SUFFIX[$this::class];
}
|
be/app/Eloquent/Model/Post/Post.php#L38
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
}
protected function getTableNameWithFid(int $fid) : string
{
- return "tbmc_f{$fid}_" . $this->getTableNameSuffix();
+ return $this->getTableNameSuffix() . "tbmc_f{$fid}_";
}
public function scopeSelectCurrentAndParentPostID(Builder $query) : Builder
{
|
be/app/Eloquent/Model/Post/Post.php#L38
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
}
protected function getTableNameWithFid(int $fid) : string
{
- return "tbmc_f{$fid}_" . $this->getTableNameSuffix();
+ return $this->getTableNameSuffix();
}
public function scopeSelectCurrentAndParentPostID(Builder $query) : Builder
{
|
be/app/Eloquent/Model/Post/Post.php#L38
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
}
protected function getTableNameWithFid(int $fid) : string
{
- return "tbmc_f{$fid}_" . $this->getTableNameSuffix();
+ return "tbmc_f{$fid}_";
}
public function scopeSelectCurrentAndParentPostID(Builder $query) : Builder
{
|
be/app/Exceptions/Handler.php#L19
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
*/
protected function convertValidationExceptionToResponse(ValidationException $e, $request) : Response
{
- return $e->response ?? response()->json(['errorCode' => 40000, 'errorInfo' => $e->validator->getMessageBag()->getMessages()], 400);
+ return $e->response ?? response()->json(['errorCode' => 40000, 'errorInfo' => $e->validator->getMessageBag()->getMessages()], 399);
}
}
|
be/app/Exceptions/Handler.php#L19
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
*/
protected function convertValidationExceptionToResponse(ValidationException $e, $request) : Response
{
- return $e->response ?? response()->json(['errorCode' => 40000, 'errorInfo' => $e->validator->getMessageBag()->getMessages()], 400);
+ return $e->response ?? response()->json(['errorCode' => 40000, 'errorInfo' => $e->validator->getMessageBag()->getMessages()], 401);
}
}
|
be/app/Helper.php#L83
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)) {
|
be/app/Http/Middleware/DumpJsonResponse.php#L15
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
public function handle(Request $request, \Closure $next) : Response
{
$response = $next($request);
- if ($response instanceof JsonResponse) {
+ if (true) {
if ($request->accepts('text/html')) {
$json = $response->content();
$jsonLength = mb_strlen($json);
|
be/app/Http/Middleware/DumpJsonResponse.php#L18
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
if ($response instanceof JsonResponse) {
if ($request->accepts('text/html')) {
$json = $response->content();
- $jsonLength = mb_strlen($json);
+ $jsonLength = strlen($json);
$assetsUrl = collect(['react-json-view', 'react', 'react-dom'])->mapWithKeys(fn($asset) => [$asset => url("/assets/{$asset}.js")]);
return response(<<<HTML
<h4>{$jsonLength} bytes</h4>
|
This job succeeded
Loading