for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
if (! function_exists('getInstanceFilter')) {
/**
* Get the available filter instance.
*
* @param null $class
$class
null
* @return mixed
*/
function getInstanceFilter($class = null)
{
$filters = config('filter.filters');
config
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$filters = /** @scrutinizer ignore-call */ config('filter.filters');
if (class_exists($filters[$class])) {
return new $filters[$class];
}
if (! function_exists('filter')) {
* Make the filter querty string.
* @param $field
* @param $value
* @return String
function filter($field, $value)
return "?{$field}:{$value}";