CS fixes for 3.1

This commit is contained in:
Tim Nagel 2015-03-12 21:45:24 +11:00
parent 345b5d423d
commit 89db88c2a0
20 changed files with 54 additions and 43 deletions

View file

@ -3,7 +3,6 @@
namespace FOS\ElasticaBundle\Command; namespace FOS\ElasticaBundle\Command;
use FOS\ElasticaBundle\Event\IndexPopulateEvent; use FOS\ElasticaBundle\Event\IndexPopulateEvent;
use FOS\ElasticaBundle\Event\PopulateEvent;
use FOS\ElasticaBundle\Event\TypePopulateEvent; use FOS\ElasticaBundle\Event\TypePopulateEvent;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Helper\DialogHelper; use Symfony\Component\Console\Helper\DialogHelper;

View file

@ -24,6 +24,7 @@ class ProgressClosureBuilder
* @param string $action * @param string $action
* @param string $index * @param string $index
* @param string $type * @param string $type
*
* @return callable * @return callable
*/ */
public function build(OutputInterface $output, $action, $index, $type) public function build(OutputInterface $output, $action, $index, $type)
@ -61,6 +62,7 @@ class ProgressClosureBuilder
* @param string $action * @param string $action
* @param string $index * @param string $index
* @param string $type * @param string $type
*
* @return callable * @return callable
*/ */
private function buildLegacy(OutputInterface $output, $action, $index, $type) private function buildLegacy(OutputInterface $output, $action, $index, $type)

View file

@ -109,6 +109,7 @@ abstract class AbstractProvider extends BaseAbstractProvider
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @param array $lastSlice * @param array $lastSlice
*
* @return array * @return array
*/ */
protected function getSlice($queryBuilder, $limit, $offset, $lastSlice) protected function getSlice($queryBuilder, $limit, $offset, $lastSlice)

View file

@ -7,7 +7,7 @@ use FOS\ElasticaBundle\Exception\InvalidArgumentTypeException;
use FOS\ElasticaBundle\Doctrine\SliceFetcherInterface; use FOS\ElasticaBundle\Doctrine\SliceFetcherInterface;
/** /**
* Fetches a slice of objects * Fetches a slice of objects.
* *
* @author Thomas Prelot <tprelot@gmail.com> * @author Thomas Prelot <tprelot@gmail.com>
*/ */

View file

@ -7,7 +7,7 @@ use FOS\ElasticaBundle\Exception\InvalidArgumentTypeException;
use FOS\ElasticaBundle\Doctrine\SliceFetcherInterface; use FOS\ElasticaBundle\Doctrine\SliceFetcherInterface;
/** /**
* Fetches a slice of objects * Fetches a slice of objects.
* *
* @author Thomas Prelot <tprelot@gmail.com> * @author Thomas Prelot <tprelot@gmail.com>
*/ */
@ -22,7 +22,7 @@ class SliceFetcher implements SliceFetcherInterface
throw new InvalidArgumentTypeException($queryBuilder, 'Doctrine\ORM\QueryBuilder'); throw new InvalidArgumentTypeException($queryBuilder, 'Doctrine\ORM\QueryBuilder');
} }
/** /*
* An orderBy DQL part is required to avoid feching the same row twice. * An orderBy DQL part is required to avoid feching the same row twice.
* @see http://stackoverflow.com/questions/6314879/does-limit-offset-length-require-order-by-for-pagination * @see http://stackoverflow.com/questions/6314879/does-limit-offset-length-require-order-by-for-pagination
* @see http://www.postgresql.org/docs/current/static/queries-limit.html * @see http://www.postgresql.org/docs/current/static/queries-limit.html

View file

@ -3,7 +3,7 @@
namespace FOS\ElasticaBundle\Doctrine; namespace FOS\ElasticaBundle\Doctrine;
/** /**
* Fetches a slice of objects * Fetches a slice of objects.
* *
* @author Thomas Prelot <tprelot@gmail.com> * @author Thomas Prelot <tprelot@gmail.com>
*/ */
@ -17,7 +17,8 @@ interface SliceFetcherInterface
* @param integer $offset * @param integer $offset
* @param array $previousSlice * @param array $previousSlice
* @param array $identifierFieldNames * @param array $identifierFieldNames
*
* @return array * @return array
*/ */
function fetch($queryBuilder, $limit, $offset, array $previousSlice, array $identifierFieldNames); public function fetch($queryBuilder, $limit, $offset, array $previousSlice, array $identifierFieldNames);
} }

View file

@ -14,7 +14,7 @@ namespace FOS\ElasticaBundle\Event;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
/** /**
* Index Populate Event * Index Populate Event.
* *
* @author Oleg Andreyev <oleg.andreyev@intexsys.lv> * @author Oleg Andreyev <oleg.andreyev@intexsys.lv>
*/ */

View file

@ -14,7 +14,7 @@ namespace FOS\ElasticaBundle\Event;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
/** /**
* Index ResetEvent * Index ResetEvent.
* *
* @author Oleg Andreyev <oleg.andreyev@intexsys.lv> * @author Oleg Andreyev <oleg.andreyev@intexsys.lv>
*/ */

View file

@ -14,7 +14,7 @@ namespace FOS\ElasticaBundle\Event;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
/** /**
* Type Populate Event * Type Populate Event.
* *
* @author Oleg Andreyev <oleg.andreyev@intexsys.lv> * @author Oleg Andreyev <oleg.andreyev@intexsys.lv>
*/ */

View file

@ -14,7 +14,7 @@ namespace FOS\ElasticaBundle\Event;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
/** /**
* Type ResetEvent * Type ResetEvent.
* *
* @author Oleg Andreyev <oleg.andreyev@intexsys.lv> * @author Oleg Andreyev <oleg.andreyev@intexsys.lv>
*/ */

View file

@ -37,7 +37,7 @@ class FantaPaginatorAdapter implements AdapterInterface
} }
/** /**
* Returns Aggregations * Returns Aggregations.
* *
* @return mixed * @return mixed
* *

View file

@ -29,7 +29,7 @@ interface PaginatorAdapterInterface
public function getFacets(); public function getFacets();
/** /**
* Returns Aggregations * Returns Aggregations.
* *
* @return mixed * @return mixed
*/ */

View file

@ -26,7 +26,7 @@ interface PartialResultsInterface
public function getFacets(); public function getFacets();
/** /**
* Returns the aggregations * Returns the aggregations.
* *
* @return array * @return array
*/ */

View file

@ -110,9 +110,12 @@ class RawPaginatorAdapter implements PaginatorAdapterInterface
/** /**
* Returns the number of results. * Returns the number of results.
* *
* @param boolean $genuineTotal make the function return the `hits.total` * If genuineTotal is provided as true, total hits is returned from the
* value of the search result in all cases, instead of limiting it to the * hits.total value from the search results instead of just returning
* `size` request parameter. * the requested size.
*
* @param boolean $genuineTotal
*
* @return integer The number of results. * @return integer The number of results.
*/ */
public function getTotalHits($genuineTotal = false) public function getTotalHits($genuineTotal = false)
@ -141,11 +144,12 @@ class RawPaginatorAdapter implements PaginatorAdapterInterface
} }
/** /**
* Returns Aggregations * Returns Aggregations.
* *
* @return mixed * @return mixed
*/ */
public function getAggregations() { public function getAggregations()
{
if (!isset($this->aggregations)) { if (!isset($this->aggregations)) {
$this->aggregations = $this->searchable->search($this->query)->getAggregations(); $this->aggregations = $this->searchable->search($this->query)->getAggregations();
} }

View file

@ -71,6 +71,7 @@ interface ObjectPersisterInterface
* If the object persister handles the given object. * If the object persister handles the given object.
* *
* @param object $object * @param object $object
*
* @return bool * @return bool
*/ */
public function handlesObject($object); public function handlesObject($object);

View file

@ -72,6 +72,7 @@ abstract class AbstractProvider implements ProviderInterface
* Get string with RAM usage information (current and peak). * Get string with RAM usage information (current and peak).
* *
* @deprecated To be removed in 4.0 * @deprecated To be removed in 4.0
*
* @return string * @return string
*/ */
protected function getMemoryUsage() protected function getMemoryUsage()

View file

@ -59,6 +59,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
* @param string $testQuery * @param string $testQuery
* @param int $testLimit * @param int $testLimit
* @param string $method * @param string $method
*
* @return \FOS\ElasticaBundle\Finder\TransformedFinder|\PHPUnit_Framework_MockObject_MockObject * @return \FOS\ElasticaBundle\Finder\TransformedFinder|\PHPUnit_Framework_MockObject_MockObject
*/ */
private function getFinderMock($testQuery, $testLimit = null, $method = 'find') private function getFinderMock($testQuery, $testLimit = null, $method = 'find')

View file

@ -411,6 +411,7 @@ class ModelToElasticaAutoTransformerTest extends \PHPUnit_Framework_TestCase
/** /**
* @param null|\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher * @param null|\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
*
* @return ModelToElasticaAutoTransformer * @return ModelToElasticaAutoTransformer
*/ */
private function getTransformer($dispatcher = null) private function getTransformer($dispatcher = null)