for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ParamProcessor;
/**
* Static class for error handling.
*
* @since 0.4
* @deprecated since 1.0
* @licence GNU GPL v2+
* @author Jeroen De Dauw < [email protected] >
*/
final class ProcessingErrorHandler {
* @var array of ProcessingError
private static $errors = [];
* Adds a single ProcessingError.
* @param string $errorMessage
$errorMessage
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
* @param integer $severity
$severity
public static function addError( ProcessingError $error ) {
self::$errors[$error->getElement()][] = $error;
}
* Adds a list of ProcessingError.
* @param array $errors
public static function addErrors( array $errors ) {
foreach ( $errors as $error ) {
self::addError( $error );
* Returns a list of all registered errors.
* @return array of ProcessingError
public static function getErrors() {
return self::$errors;
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.