@@ -214,7 +214,7 @@ |
||
| 214 | 214 | $criteria = new Comparator(); |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | - uasort($this->items, function ($a, $b) use ($criteria) { |
|
| 217 | + uasort($this->items, function($a, $b) use ($criteria) { |
|
| 218 | 218 | return $criteria->compare($a, $b); |
| 219 | 219 | }); |
| 220 | 220 | } |
@@ -188,7 +188,7 @@ |
||
| 188 | 188 | if (!($this->iterator instanceof \ArrayIterator)) { |
| 189 | 189 | $this->iterator = new \ArrayIterator(iterator_to_array($this->iterator)); |
| 190 | 190 | } |
| 191 | - $this->iterator->uasort(function ($a, $b) { |
|
| 191 | + $this->iterator->uasort(function($a, $b) { |
|
| 192 | 192 | return $this->sortCriteria()->compare($a, $b); |
| 193 | 193 | }); |
| 194 | 194 | |
@@ -284,7 +284,7 @@ |
||
| 284 | 284 | ) |
| 285 | 285 | ->when($keys = $collection->keys()) |
| 286 | 286 | ->collection($keys) |
| 287 | - ->array($keys->toArray()) |
|
| 287 | + ->array($keys->toArray()) |
|
| 288 | 288 | ->isEqualTo(\array_keys($collection->toArray())); |
| 289 | 289 | } |
| 290 | 290 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | ->boolean($collection->containsKey($key)) |
| 106 | 106 | ->isTrue() |
| 107 | 107 | ->and |
| 108 | - ->exception(function () use ($collection, $unique) { |
|
| 108 | + ->exception(function() use ($collection, $unique) { |
|
| 109 | 109 | $collection->set($unique, $unique); |
| 110 | 110 | })->isInstanceOf(InvalidKeyException::class) |
| 111 | 111 | ; |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | ->variable($collection[$key]) |
| 265 | 265 | ->isEqualTo($unique) |
| 266 | 266 | ->and() |
| 267 | - ->when(function () use ($collection, $key) { |
|
| 267 | + ->when(function() use ($collection, $key) { |
|
| 268 | 268 | unset($collection[$key]); |
| 269 | 269 | }) |
| 270 | 270 | ->then() |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | $this |
| 121 | 121 | ->given( |
| 122 | 122 | $comparator = new Comparator(), |
| 123 | - $sortCriteria = new Custom(function ($a, $b) use ($comparator) { |
|
| 123 | + $sortCriteria = new Custom(function($a, $b) use ($comparator) { |
|
| 124 | 124 | return -1 * $comparator->compare($a, $b); |
| 125 | 125 | }), |
| 126 | 126 | $datasource = $this->randomDataSource(Criteria::method('value')->lt(10), $sortCriteria) |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $this->getAssertionManager() |
| 61 | 61 | ->setHandler( |
| 62 | 62 | 'randomDataSource', |
| 63 | - function ( |
|
| 63 | + function( |
|
| 64 | 64 | SpecificationInterface $searchCriteria = null, |
| 65 | 65 | ComparatorInterface $sortCriteria = null, |
| 66 | 66 | $offset = null, |
@@ -76,13 +76,13 @@ discard block |
||
| 76 | 76 | ) |
| 77 | 77 | ->setHandler( |
| 78 | 78 | 'emptyDataSource', |
| 79 | - function () { |
|
| 79 | + function() { |
|
| 80 | 80 | return $this->emptyDataSource(); |
| 81 | 81 | } |
| 82 | 82 | ) |
| 83 | 83 | ->setHandler( |
| 84 | 84 | 'uniqueValue', |
| 85 | - function () { |
|
| 85 | + function() { |
|
| 86 | 86 | return $this->uniqueValue(); |
| 87 | 87 | } |
| 88 | 88 | ) |
@@ -160,11 +160,11 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | private function checkMatchResult($result) |
| 162 | 162 | { |
| 163 | - if($result === true && $this->assertAll === false) { |
|
| 163 | + if ($result === true && $this->assertAll === false) { |
|
| 164 | 164 | $this->fail($this->_('At least one items that match with the given criteria')); |
| 165 | 165 | return false; |
| 166 | 166 | } |
| 167 | - if($result === false && $this->assertAll === true) { |
|
| 167 | + if ($result === false && $this->assertAll === true) { |
|
| 168 | 168 | $this->fail($this->_('At least one items that not match with the given criteria')); |
| 169 | 169 | return false; |
| 170 | 170 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | public function isSortedUsing(ComparatorInterface $comparator) |
| 190 | 190 | { |
| 191 | 191 | list($item1, $item2) = $this->checkIsSorted($comparator); |
| 192 | - if($item1 !== null && $item2 !== null) { |
|
| 192 | + if ($item1 !== null && $item2 !== null) { |
|
| 193 | 193 | $this->fail( |
| 194 | 194 | $this->_("There are items [%s, %s] that aren't ordered in the given collection", $item1, $item2) |
| 195 | 195 | ); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | public function isNotSortedUsing(ComparatorInterface $comparator) |
| 217 | 217 | { |
| 218 | 218 | list($item1, $item2) = $this->checkIsSorted($comparator); |
| 219 | - if($item1 !== null && $item2 !== null) { |
|
| 219 | + if ($item1 !== null && $item2 !== null) { |
|
| 220 | 220 | $this->fail($this->_('The given collection is sorted')); |
| 221 | 221 | } else { |
| 222 | 222 | $this->pass(); |