for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace FileEye\MimeMap;
/**
* Class for managing map singletons.
*/
abstract class MapHandler
{
* The default map PHP class.
const DEFAULT_MAP_CLASS = '\FileEye\MimeMap\Map\ApacheMap';
* The default map class to use.
*
* It can be overridden by ::setDefaultMapClass.
* @var string
protected static $defaultMapClass = MapHandler::DEFAULT_MAP_CLASS;
* Sets a map class as default for new instances.
* @param string $map_class A FQCN.
public static function setDefaultMapClass($map_class)
static::$defaultMapClass = $map_class;
}
* Returns the map instance.
* @param string $map
$map
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.
* (Optional) The map FQCN to be used. If null, the default map will be
* used.
* @return string
public static function map($map_class = null)
if (!$map_class) {
$map_class = static::$defaultMapClass;
return $map_class::getInstance();
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.