for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Xetaravel\Models\Presenters;
use Illuminate\Database\Eloquent\Casts\Attribute;
trait BlogCategoryPresenter
{
/**
* Get the category url.
*
* @return Attribute
*/
protected function showUrl(): Attribute
return Attribute::make(
get: fn () => route('blog.category.show', ['slug' => $this?->slug, 'id' => $this?->getKey()])
getKey()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
get: fn () => route('blog.category.show', ['slug' => $this?->slug, 'id' => $this?->/** @scrutinizer ignore-call */ getKey()])
);
}