Skip to content

Commit 89db88c

Browse files
committed
CS fixes for 3.1
1 parent 345b5d4 commit 89db88c

20 files changed

+54
-43
lines changed

Command/PopulateCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace FOS\ElasticaBundle\Command;
44

55
use FOS\ElasticaBundle\Event\IndexPopulateEvent;
6-
use FOS\ElasticaBundle\Event\PopulateEvent;
76
use FOS\ElasticaBundle\Event\TypePopulateEvent;
87
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
98
use Symfony\Component\Console\Helper\DialogHelper;
@@ -181,8 +180,8 @@ private function populateIndexType(OutputInterface $output, $index, $type, $rese
181180
* Refreshes an index.
182181
*
183182
* @param OutputInterface $output
184-
* @param string $index
185-
* @param bool $postPopulate
183+
* @param string $index
184+
* @param bool $postPopulate
186185
*/
187186
private function refreshIndex(OutputInterface $output, $index, $postPopulate = true)
188187
{

Command/ProgressClosureBuilder.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ class ProgressClosureBuilder
2121
* line.
2222
*
2323
* @param OutputInterface $output
24-
* @param string $action
25-
* @param string $index
26-
* @param string $type
24+
* @param string $action
25+
* @param string $index
26+
* @param string $type
27+
*
2728
* @return callable
2829
*/
2930
public function build(OutputInterface $output, $action, $index, $type)
@@ -58,9 +59,10 @@ public function build(OutputInterface $output, $action, $index, $type)
5859
* methods to support what we need.
5960
*
6061
* @param OutputInterface $output
61-
* @param string $action
62-
* @param string $index
63-
* @param string $type
62+
* @param string $action
63+
* @param string $index
64+
* @param string $type
65+
*
6466
* @return callable
6567
*/
6668
private function buildLegacy(OutputInterface $output, $action, $index, $type)

Doctrine/AbstractProvider.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function populate(\Closure $loggerClosure = null, array $options = array(
7777
} else {
7878
try {
7979
$this->objectPersister->insertMany($objects);
80-
} catch(BulkResponseException $e) {
80+
} catch (BulkResponseException $e) {
8181
if ($loggerClosure) {
8282
$loggerClosure($batchSize, $nbObjects, sprintf('<error>%s</error>', $e->getMessage()));
8383
}
@@ -106,9 +106,10 @@ public function populate(\Closure $loggerClosure = null, array $options = array(
106106
* the fetchSlice methods defined in the ORM/MongoDB subclasses.
107107
*
108108
* @param $queryBuilder
109-
* @param int $limit
110-
* @param int $offset
109+
* @param int $limit
110+
* @param int $offset
111111
* @param array $lastSlice
112+
*
112113
* @return array
113114
*/
114115
protected function getSlice($queryBuilder, $limit, $offset, $lastSlice)

Doctrine/MongoDB/SliceFetcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use FOS\ElasticaBundle\Doctrine\SliceFetcherInterface;
88

99
/**
10-
* Fetches a slice of objects
10+
* Fetches a slice of objects.
1111
*
1212
* @author Thomas Prelot <[email protected]>
1313
*/

Doctrine/ORM/SliceFetcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use FOS\ElasticaBundle\Doctrine\SliceFetcherInterface;
88

99
/**
10-
* Fetches a slice of objects
10+
* Fetches a slice of objects.
1111
*
1212
* @author Thomas Prelot <[email protected]>
1313
*/
@@ -22,7 +22,7 @@ public function fetch($queryBuilder, $limit, $offset, array $previousSlice, arra
2222
throw new InvalidArgumentTypeException($queryBuilder, 'Doctrine\ORM\QueryBuilder');
2323
}
2424

25-
/**
25+
/*
2626
* An orderBy DQL part is required to avoid feching the same row twice.
2727
* @see http://stackoverflow.com/questions/6314879/does-limit-offset-length-require-order-by-for-pagination
2828
* @see http://www.postgresql.org/docs/current/static/queries-limit.html
@@ -31,7 +31,7 @@ public function fetch($queryBuilder, $limit, $offset, array $previousSlice, arra
3131
$orderBy = $queryBuilder->getDQLPart('orderBy');
3232
if (empty($orderBy)) {
3333
$rootAliases = $queryBuilder->getRootAliases();
34-
34+
3535
foreach ($identifierFieldNames as $fieldName) {
3636
$queryBuilder->addOrderBy($rootAliases[0].'.'.$fieldName);
3737
}

Doctrine/SliceFetcherInterface.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace FOS\ElasticaBundle\Doctrine;
44

55
/**
6-
* Fetches a slice of objects
6+
* Fetches a slice of objects.
77
*
88
* @author Thomas Prelot <[email protected]>
99
*/
@@ -17,7 +17,8 @@ interface SliceFetcherInterface
1717
* @param integer $offset
1818
* @param array $previousSlice
1919
* @param array $identifierFieldNames
20+
*
2021
* @return array
2122
*/
22-
function fetch($queryBuilder, $limit, $offset, array $previousSlice, array $identifierFieldNames);
23+
public function fetch($queryBuilder, $limit, $offset, array $previousSlice, array $identifierFieldNames);
2324
}

Event/IndexPopulateEvent.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\EventDispatcher\Event;
1515

1616
/**
17-
* Index Populate Event
17+
* Index Populate Event.
1818
*
1919
* @author Oleg Andreyev <[email protected]>
2020
*/
@@ -39,9 +39,9 @@ class IndexPopulateEvent extends Event
3939
private $options;
4040

4141
/**
42-
* @param string $index
43-
* @param boolean $reset
44-
* @param array $options
42+
* @param string $index
43+
* @param boolean $reset
44+
* @param array $options
4545
*/
4646
public function __construct($index, $reset, $options)
4747
{

Event/IndexResetEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\EventDispatcher\Event;
1515

1616
/**
17-
* Index ResetEvent
17+
* Index ResetEvent.
1818
*
1919
* @author Oleg Andreyev <[email protected]>
2020
*/

Event/TypePopulateEvent.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\EventDispatcher\Event;
1515

1616
/**
17-
* Type Populate Event
17+
* Type Populate Event.
1818
*
1919
* @author Oleg Andreyev <[email protected]>
2020
*/
@@ -31,8 +31,8 @@ class TypePopulateEvent extends IndexPopulateEvent
3131
/**
3232
* @param string $index
3333
* @param string $type
34-
* @param bool $reset
35-
* @param array $options
34+
* @param bool $reset
35+
* @param array $options
3636
*/
3737
public function __construct($index, $type, $reset, $options)
3838
{

Event/TypeResetEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\EventDispatcher\Event;
1515

1616
/**
17-
* Type ResetEvent
17+
* Type ResetEvent.
1818
*
1919
* @author Oleg Andreyev <[email protected]>
2020
*/

0 commit comments

Comments
 (0)