for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace GBProd\ElasticsearchExtraBundle\Repository;
use Elasticsearch\Client;
/**
* Repository for clients
*
* @author gbprod <[email protected]>
*/
class ClientRepository
{
* @var array<Client>
private $clients;
* @param array $clients
public function __construct(array $clients = array())
$this->clients = $clients;
}
* Get client from his id
* @param string $id
* @return Elasticsearch\Client
null|Client
This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.
@return
public function get($id)
if (!isset($this->clients[$id])) {
return null;
return $this->clients[$id];
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.