for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Divergence package.
*
* (c) Henry Paradiz <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Divergence\CLI\Controllers;
abstract class CommandLineHandler
{
public static $_args;
abstract public static function handle();
protected static function setArgs($path = null)
$path
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected static function setArgs(/** @scrutinizer ignore-unused */ $path = 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 (!static::$_args) {
static::$_args = $_SERVER['argv'];
}
protected static function peekArgs()
if (!isset(static::$_args)) {
static::setArgs();
return count(static::$_args) ? static::$_args[0] : false;
protected static function shiftArgs()
return array_shift(static::$_args);
protected static function getArgs()
return static::$_args;
protected static function unshiftArgs($string)
return array_unshift(static::$_args, $string);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.