for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace GBProd\ElasticsearchDataProviderBundle\DataProvider;
/**
* Registry for DataProvider
*
* @author gbprod <[email protected]>
*/
class Registry
{
* @var array<RegistryEntry>
private $entries = [];
* Add a entry to the registry
* @param RegistryEntry $entry
public function add(RegistryEntry $entry)
$this->entries[] = $entry;
return $this;
}
* Get entries for index and type
* @param string $index
$index
string|null
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 $type
$type
* @return array<ProviderEntry>
public function get($index = null, $type = null)
return array_filter(
$this->entries,
function ($entry) use ($index, $type) {
return $entry->match($index, $type);
);
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.