@@ -27,7 +27,7 @@ |
||
| 27 | 27 | var_dump(($results[5])->toArray()); |
| 28 | 28 | |
| 29 | 29 | //Traversable |
| 30 | -foreach($results as $result){
|
|
| 30 | +foreach ($results as $result) {
|
|
| 31 | 31 | var_dump($result->toArray()); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function __construct(array $items = [], int $totalMatches = 0) |
| 21 | 21 | {
|
| 22 | - foreach($items as $item) {
|
|
| 22 | + foreach ($items as $item) {
|
|
| 23 | 23 | if (!$item instanceof IItem) {
|
| 24 | 24 | throw new InvalidArgumentException('Given items must implement Radowoj\Searcher\SearchResult\IItem interface');
|
| 25 | 25 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | protected function fromArray(array $data) |
| 22 | 22 | {
|
| 23 | - foreach($data as $key => $value) {
|
|
| 23 | + foreach ($data as $key => $value) {
|
|
| 24 | 24 | if (!property_exists($this, $key)) {
|
| 25 | 25 | throw new InvalidArgumentException("Invalid search result item property: {$key}");
|
| 26 | 26 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | $paramsMerged = []; |
| 48 | 48 | |
| 49 | - foreach($params as $key => $value) {
|
|
| 49 | + foreach ($params as $key => $value) {
|
|
| 50 | 50 | $paramsMerged[] = "{$key}={$value}";
|
| 51 | 51 | } |
| 52 | 52 | |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | var_dump(($results[5])->toArray()); |
| 28 | 28 | |
| 29 | 29 | //Traversable |
| 30 | -foreach($results as $result){
|
|
| 30 | +foreach ($results as $result) {
|
|
| 31 | 31 | var_dump($result->toArray()); |
| 32 | 32 | } |
| 33 | 33 | |