for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ApiPlatform\Core\Metadata\Resource;
/**
* A map of resource configurations per resource class.
* @author Antoine Bluchet <[email protected]>
final class ConfigurationMap implements \IteratorAggregate
{
private $configurations;
* @param string[] $classes
$classes
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.
public function __construct(array $configurations = [])
$this->configurations = $configurations;
}
* @param string $key
* @param array $value
public function add($key, $value)
if (isset($this->configurations[$key])) {
return;
$this->configurations[$key] = $value;
public function get($key)
return $this->configurations[$key] ?? false;
* {@inheritdoc}
public function getIterator()
return new \ArrayIterator($this->configurations);
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.