for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ParcelValue\ApiClient\Traits;
trait ControllerTrait
{
abstract protected function request();
abstract protected function setData($key, $value);
protected function initPaths()
$this->setData('path', $this->config()->get('app/path'));
config()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$this->setData('path', $this->/** @scrutinizer ignore-call */ config()->get('app/path'));
$this->setData('url/app', $this->request()->getAppUrl());
$this->setData('url/lang', $this->request()->getUrl(['lang']));
$this->setData('url/current', $this->request()->getUrl());
}
/**
* Called (optionally) by each method.
*/
protected function init($action)
$action
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected function init(/** @scrutinizer ignore-unused */ $action)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.