for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dongdavid\Notify;
use Dongdavid\Notify\utils\Redis;
// 如果没有cache方法就自定义一个方法用redis做缓存
if (!function_exists('cache')) {
function cache($name, $value = null)
{
if (is_array($name)) {
// name 若传入为数组,则当作redis链接配置
Redis::setConfig($name);
} else {
if ($value === null) {
return Redis::get($name);
Redis::set($name, $value);
}
return \cache($name, $value);
cache
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return /** @scrutinizer ignore-call */ \cache($name, $value);
if (!function_exists('config')) {
function config($name, $value = null)
$name
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
function config(/** @scrutinizer ignore-unused */ $name, $value = null)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
if (null !== $value) {
\Dongdavid\Notify\cache('notify-config', $value);
return \Dongdavid\Notify\cache('notify-config');
return \config($name, $value);
config
return /** @scrutinizer ignore-call */ \config($name, $value);