for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Terranet\Administrator\Field\Traits;
trait HandlesVisibility
{
/** @var null|\Closure */
protected $when;
/**
* @return bool
*/
public function visibleWhen(): bool
return $this->when ? $this->when->call($this, request()) : true;
request
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return $this->when ? $this->when->call($this, /** @scrutinizer ignore-call */ request()) : true;
}