for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Sfneal\Testing\Utils\Traits;
use Illuminate\Testing\TestResponse;
trait WithResponse
{
/**
* @var string Name of the route
*/
protected $routeName;
* @var array Params to pass to the route
protected $routeParams = [];
* @var TestResponse
protected $response;
* Retrieve a 'GET' response using route & params.
*
* @return TestResponse
protected function getResponse(): TestResponse
return $this->get(route($this->routeName, $this->routeParams));
get()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return $this->/** @scrutinizer ignore-call */ get(route($this->routeName, $this->routeParams));
}