| 1 | <?php |
||
| 12 | class SkylabException extends \ErrorException |
||
| 13 | { |
||
| 14 | |||
| 15 | private $context; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * (PHP 5 >= 5.1.0)<br/> |
||
| 19 | * Constructs the exception |
||
| 20 | * @link http://php.net/manual/en/errorexception.construct.php |
||
| 21 | * @param string $message [optional] The Exception message to throw. |
||
| 22 | * @param int $code [optional] The Exception code. |
||
| 23 | * @param int $severity [optional] The severity level of the exception. |
||
| 24 | * @param string $filename [optional] The filename where the exception is thrown. |
||
| 25 | * @param int $lineno [optional] The line number where the exception is thrown. |
||
| 26 | * @param \Exception $previous [optional] The previous exception used for the exception chaining. |
||
|
|
|||
| 27 | * @param array $context |
||
| 28 | */ |
||
| 29 | public function __construct($message = "", $code = 0, $severity = 1, $filename = __FILE__, $lineno = __LINE__, $previous = null, $context = array()) { |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return mixed |
||
| 36 | */ |
||
| 37 | public function getContext() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param mixed $context |
||
| 44 | */ |
||
| 45 | public function setContext($context) |
||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | } |
This check looks for
@paramannotations 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.