for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the webmozart/console package.
*
* (c) Bernhard Schussek <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Webmozart\Console\Api\Command;
use Exception;
use RuntimeException;
/**
* Thrown when a command was not found.
* @since 1.0
* @author Bernhard Schussek <[email protected]>
class NoSuchCommandException extends RuntimeException
{
* Creates an exception for the given command name.
* @param string $name The command name.
* @param int $code The exception code.
* @param Exception $cause The exception that caused this exception.
$cause
null|Exception
This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.
@param
It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.
* @return static The created exception.
public static function forCommandName($name, $code = 0, Exception $cause = null)
return new static(sprintf(
'The command "%s" does not exist.',
$name
), $code, $cause);
}
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.