for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace GBProd\ElasticsearchDataProviderBundle\DataProvider;
/**
* Entry for dataprovider registry
*
* @author gbprod <[email protected]>
*/
class RegistryEntry
{
* @var DataProviderInterface
private $provider;
* @var string
private $index;
private $type;
* @param DataProvider $provider
$provider
DataProviderInterface
This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.
@param
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.
* @param string $index
* @param string $type
public function __construct(DataProviderInterface $provider, $index, $type)
$this->provider = $provider;
$this->index = $index;
$this->type = $type;
}
* Get provider
* @return DataProviderInterface
public function getProvider()
return $this->provider;
* Get index
* @return string
public function getIndex()
return $this->index;
* Get type
public function getType()
return $this->type;
public function match($index, $type)
return ($this->getIndex() == $index && $this->getType() == $type)
|| ($this->getIndex() == $index && $type === null)
|| (null === $index && $type === null)
;
This check looks for
@param
annotations 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.