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 GrahamCampbell\Markdown\Facades\Markdown;
use Illuminate\Database\Eloquent\Casts\Attribute;
trait DiscussPostPresenter
{
/**
* Get the content parsed in HTML.
*
* @return Attribute
*/
protected function contentMarkdown(): Attribute
return Attribute::make(
get: fn () => Markdown::convert($this->content)
);
}
* Get the post url.
protected function postUrl(): Attribute
get: fn () => route('discuss.post.show', ['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('discuss.post.show', ['id' => $this->/** @scrutinizer ignore-call */ getKey()])