for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Wingsline\Blog\Posts;
use Spatie\ResponseCache\Facades\ResponseCache;
class PostObserver
{
/**
* Handle the Post "created" event.
*
* @return void
*/
public function created(Post $post)
$this->clearResponseCache($post);
}
* Handle the Post "deleted" event.
public function deleted(Post $post)
* Handle the Post "updated" event.
public function updated(Post $post)
* Clears the respoonse cache.
protected function clearResponseCache(Post $post)
$post
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected function clearResponseCache(/** @scrutinizer ignore-unused */ Post $post)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
ResponseCache::clear();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.