@@ -330,7 +330,7 @@ |
||
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | foreach ($facets as &$facet) { |
| 333 | - $facet = array_filter($facet, function($v){ |
|
| 333 | + $facet = array_filter($facet, function($v) { |
|
| 334 | 334 | return $v["doc_count"] != 0; |
| 335 | 335 | }); |
| 336 | 336 | } |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | function let( |
| 31 | 31 | DocumentManagerInterface $documentManager |
| 32 | - ) |
|
| 33 | - { |
|
| 32 | + ) { |
|
| 34 | 33 | $this->beConstructedWith( |
| 35 | 34 | $documentManager, |
| 36 | 35 | '/path/to' |
@@ -46,8 +45,7 @@ discard block |
||
| 46 | 45 | ResourceControllerEvent $event, |
| 47 | 46 | ClassMetadata $documentMetadata, |
| 48 | 47 | DocumentManagerInterface $documentManager |
| 49 | - ) |
|
| 50 | - { |
|
| 48 | + ) { |
|
| 51 | 49 | $event->getSubject()->willReturn(new \stdClass()); |
| 52 | 50 | $documentManager->getClassMetadata(\stdClass::class)->willReturn( |
| 53 | 51 | $documentMetadata |
@@ -66,8 +64,7 @@ discard block |
||
| 66 | 64 | ResourceControllerEvent $event, |
| 67 | 65 | ClassMetadata $documentMetadata, |
| 68 | 66 | DocumentManagerInterface $documentManager |
| 69 | - ) |
|
| 70 | - { |
|
| 67 | + ) { |
|
| 71 | 68 | $this->beConstructedWith( |
| 72 | 69 | $documentManager, |
| 73 | 70 | '/path/to', |
@@ -92,8 +89,7 @@ discard block |
||
| 92 | 89 | ResourceControllerEvent $event, |
| 93 | 90 | ClassMetadata $documentMetadata, |
| 94 | 91 | DocumentManagerInterface $documentManager |
| 95 | - ) |
|
| 96 | - { |
|
| 92 | + ) { |
|
| 97 | 93 | $subjectDocument = new \stdClass(); |
| 98 | 94 | $parentDocument = new \stdClass(); |
| 99 | 95 | |
@@ -115,8 +111,7 @@ discard block |
||
| 115 | 111 | DocumentManagerInterface $documentManager, |
| 116 | 112 | SessionInterface $session, |
| 117 | 113 | NodeInterface $node |
| 118 | - ) |
|
| 119 | - { |
|
| 114 | + ) { |
|
| 120 | 115 | $this->beConstructedWith( |
| 121 | 116 | $documentManager, |
| 122 | 117 | '/path/to', |
@@ -151,8 +146,7 @@ discard block |
||
| 151 | 146 | ResourceControllerEvent $event, |
| 152 | 147 | ClassMetadata $documentMetadata, |
| 153 | 148 | DocumentManagerInterface $documentManager |
| 154 | - ) |
|
| 155 | - { |
|
| 149 | + ) { |
|
| 156 | 150 | $this->beConstructedWith( |
| 157 | 151 | $documentManager, |
| 158 | 152 | '/path/to', |
@@ -181,8 +175,7 @@ discard block |
||
| 181 | 175 | ResourceControllerEvent $event, |
| 182 | 176 | ClassMetadata $documentMetadata, |
| 183 | 177 | DocumentManagerInterface $documentManager |
| 184 | - ) |
|
| 185 | - { |
|
| 178 | + ) { |
|
| 186 | 179 | $subjectDocument = new \stdClass(); |
| 187 | 180 | |
| 188 | 181 | $event->getSubject()->willReturn($subjectDocument); |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | function let( |
| 28 | 28 | DocumentManagerInterface $documentManager |
| 29 | - ) |
|
| 30 | - { |
|
| 29 | + ) { |
|
| 31 | 30 | $this->beConstructedWith( |
| 32 | 31 | $documentManager |
| 33 | 32 | ); |
@@ -42,8 +41,7 @@ discard block |
||
| 42 | 41 | DocumentManagerInterface $documentManager, |
| 43 | 42 | ResourceControllerEvent $event, |
| 44 | 43 | ClassMetadata $metadata |
| 45 | - ) |
|
| 46 | - { |
|
| 44 | + ) { |
|
| 47 | 45 | $document = new \stdClass(); |
| 48 | 46 | $event->getSubject()->willReturn($document); |
| 49 | 47 | $documentManager->getClassMetadata('stdClass')->willReturn($metadata); |
@@ -59,8 +57,7 @@ discard block |
||
| 59 | 57 | ResourceControllerEvent $event, |
| 60 | 58 | ClassMetadata $metadata, |
| 61 | 59 | NodeInterface $node |
| 62 | - ) |
|
| 63 | - { |
|
| 60 | + ) { |
|
| 64 | 61 | $document = new \stdClass(); |
| 65 | 62 | $parentDocument = new \stdClass(); |
| 66 | 63 | $event->getSubject()->willReturn($document); |
@@ -85,8 +82,7 @@ discard block |
||
| 85 | 82 | ResourceControllerEvent $event, |
| 86 | 83 | ClassMetadata $metadata, |
| 87 | 84 | NodeInterface $node |
| 88 | - ) |
|
| 89 | - { |
|
| 85 | + ) { |
|
| 90 | 86 | $document = new \stdClass(); |
| 91 | 87 | $parentDocument = new \stdClass(); |
| 92 | 88 | $existingDocument = new \stdClass(); |
@@ -124,7 +124,8 @@ |
||
| 124 | 124 | if (isset($options['suffix'])) { |
| 125 | 125 | $suffix = $options['suffix']; |
| 126 | 126 | |
| 127 | - if (substr($this->parentSlug, -strlen($suffix)) === $suffix) { //endsWith |
|
| 127 | + if (substr($this->parentSlug, -strlen($suffix)) === $suffix) { |
|
| 128 | +//endsWith |
|
| 128 | 129 | $this->parentSlug = substr_replace($this->parentSlug, '', -1 * strlen($suffix)); |
| 129 | 130 | } |
| 130 | 131 | } |
@@ -196,7 +196,7 @@ |
||
| 196 | 196 | ->arrayNode('drivers') |
| 197 | 197 | ->info('Enable drivers which are distributed with this bundle') |
| 198 | 198 | ->validate() |
| 199 | - ->ifTrue(function ($value) use ($validDrivers) { |
|
| 199 | + ->ifTrue(function ($value) use ($validDrivers) { |
|
| 200 | 200 | return 0 !== count(array_diff($value, $validDrivers)); |
| 201 | 201 | }) |
| 202 | 202 | ->thenInvalid(sprintf('Invalid driver specified in %%s, valid drivers: ["%s"]', implode('", "', $validDrivers))) |
@@ -28,7 +28,8 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | class ThemeAwareTranslatorSpec extends ObjectBehavior |
| 30 | 30 | { |
| 31 | - function let(TranslatorInterface $translator, ThemeContextInterface $themeContext) { |
|
| 31 | + function let(TranslatorInterface $translator, ThemeContextInterface $themeContext) |
|
| 32 | + { |
|
| 32 | 33 | $translator->implement(TranslatorBagInterface::class); |
| 33 | 34 | |
| 34 | 35 | $this->beConstructedWith($translator, $themeContext); |
@@ -496,7 +496,7 @@ |
||
| 496 | 496 | /** |
| 497 | 497 | * @return bool |
| 498 | 498 | */ |
| 499 | - public function isSimple() |
|
| 499 | + public function isSimple() |
|
| 500 | 500 | { |
| 501 | 501 | return 1 === $this->variants->count() && !$this->hasOptions(); |
| 502 | 502 | } |
@@ -62,8 +62,7 @@ discard block |
||
| 62 | 62 | function it_filters_data_containing_empty_strings( |
| 63 | 63 | DataSourceInterface $dataSource, |
| 64 | 64 | ExpressionBuilderInterface $expressionBuilder |
| 65 | - ) |
|
| 66 | - { |
|
| 65 | + ) { |
|
| 67 | 66 | $dataSource->getExpressionBuilder()->willReturn($expressionBuilder); |
| 68 | 67 | |
| 69 | 68 | $expressionBuilder->isNull('firstName')->willReturn('EXPR'); |
@@ -87,8 +86,7 @@ discard block |
||
| 87 | 86 | function it_filters_data_containing_a_string( |
| 88 | 87 | DataSourceInterface $dataSource, |
| 89 | 88 | ExpressionBuilderInterface $expressionBuilder |
| 90 | - ) |
|
| 91 | - { |
|
| 89 | + ) { |
|
| 92 | 90 | $dataSource->getExpressionBuilder()->willReturn($expressionBuilder); |
| 93 | 91 | |
| 94 | 92 | $expressionBuilder->like('firstName', '%John%')->willReturn('EXPR'); |
@@ -65,8 +65,7 @@ |
||
| 65 | 65 | |
| 66 | 66 | function is_configures_options( |
| 67 | 67 | OptionsResolver $resolver |
| 68 | - ) |
|
| 69 | - { |
|
| 68 | + ) { |
|
| 70 | 69 | $resolver->setDefaults([ |
| 71 | 70 | 'format' => 'Y:m:d H:i:s' |
| 72 | 71 | ])->shouldBeCalled(); |