for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ZenCash\Rpc\Command\Util;
use ZenCash\Rpc\Command;
final class CreateMultiSig implements Command
{
private const METHOD = 'createmultisig';
private $nRequired;
private $keys;
/**
* CreateMultiSig constructor
* @param int $nRequired
* @param string[] $keys
*/
public function __construct(int $nRequired, array $keys)
call_user_func_array(function(string ...$keys) {}, $keys);
$keys
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
call_user_func_array(function(/** @scrutinizer ignore-unused */ string ...$keys) {}, $keys);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
if (empty($keys)) {
throw new \InvalidArgumentException('At least 1 key must be supplied.');
}
$this->nRequired = $nRequired;
$this->keys = $keys;
public function jsonSerialize(): object
return (object) [
'jsonrpc' => Command::JSON_RPC_VERSION,
'id' => Command::ID,
'method' => self::METHOD,
'params' => [ $this->nRequired, $this->keys ]
];
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.