for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Resta\Support;
use SuperClosure\Serializer;
class SuperClosure
{
/**
* @var null|object
*/
private static $singleton;
* @return Serializer
public static function getInstance()
if(is_null(self::$singleton)){
self::$singleton = new Serializer();
}
return self::$singleton;
public static function get($object)
$object
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public static function get(/** @scrutinizer ignore-unused */ $object)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
public static function set($data)
if(is_callable($data)){
return self::getInstance()->serialize($data);
return self::getInstance()->serialize(function() use ($data){
return $data;
});
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.