for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Xetaravel\Models\Presenters;
trait ShopCategoryPresenter
{
/**
* Get the category url.
*
* @return string
*/
public function getCategoryUrlAttribute(): string
if (!isset($this->slug)) {
return '';
}
return route('shop.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
return route('shop.category.show', ['slug' => $this->slug, 'id' => $this->/** @scrutinizer ignore-call */ getKey()]);