for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types = 1);
/**
* Created by PhpStorm.
* User: root
* Date: 27.07.2016
* Time: 1:55.
*/
namespace samsonframework\containercollection\attribute;
use samsonframework\container\configurator\ClassConfiguratorInterface;
use samsonframework\container\configurator\ParameterConfiguratorInterface;
use samsonframework\container\configurator\PropertyConfiguratorInterface;
use samsonframework\container\metadata\ClassMetadata;
use samsonframework\container\metadata\ParameterMetadata;
use samsonframework\container\metadata\PropertyMetadata;
* Property/parameter value attribute configurator class.
*
* @author Vitaly Egorov <[email protected]>
class Value implements PropertyConfiguratorInterface, ParameterConfiguratorInterface, AttributeConfiguratorInterface
{
/** @var string Configurator key */
const KEY = 'value';
* @var string Property/Parameter value
protected $value;
* Class collection configurator constructor.
* @param string $className Class name
$className
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(string $value)
$this->value = $value;
}
/* {@inheritDoc} */
public function toPropertyMetadata(PropertyMetadata $propertyMetadata)
$propertyMetadata->dependency = $this->value;
public function toParameterMetadata(ParameterMetadata $parameterMetadata)
$parameterMetadata->dependency = $this->value;
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.