@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare( strict_types = 1 ); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ModernTimeline; |
6 | 6 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | return $this->imageUrl; |
39 | 39 | } |
40 | 40 | |
41 | - public function setImageUrl( string $url ): void { |
|
41 | + public function setImageUrl(string $url): void { |
|
42 | 42 | $this->imageUrl = $url; |
43 | 43 | } |
44 | 44 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare( strict_types = 1 ); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ModernTimeline\ResultFacade; |
6 | 6 | |
@@ -20,32 +20,32 @@ discard block |
||
20 | 20 | */ |
21 | 21 | private $constructionFunction; |
22 | 22 | |
23 | - public function __construct( callable $registry ) { |
|
23 | + public function __construct(callable $registry) { |
|
24 | 24 | $this->registry = $registry; |
25 | 25 | } |
26 | 26 | |
27 | - public function withName( string $name ): self { |
|
27 | + public function withName(string $name): self { |
|
28 | 28 | $this->name = $name; |
29 | 29 | return $this; |
30 | 30 | } |
31 | 31 | |
32 | - public function andMessageKey( string $nameMessageKey ): self { |
|
32 | + public function andMessageKey(string $nameMessageKey): self { |
|
33 | 33 | $this->nameMessageKey = $nameMessageKey; |
34 | 34 | return $this; |
35 | 35 | } |
36 | 36 | |
37 | - public function andParameterDefinitions( array $parameterDefinitions ): self { |
|
37 | + public function andParameterDefinitions(array $parameterDefinitions): self { |
|
38 | 38 | $this->parameterDefinitions = $parameterDefinitions; |
39 | 39 | return $this; |
40 | 40 | } |
41 | 41 | |
42 | - public function andPresenterBuilder( callable $constructionFunction ): self { |
|
42 | + public function andPresenterBuilder(callable $constructionFunction): self { |
|
43 | 43 | $this->constructionFunction = $constructionFunction; |
44 | 44 | return $this; |
45 | 45 | } |
46 | 46 | |
47 | 47 | public function register(): void { |
48 | - call_user_func( $this->registry, $this->newResultFormat() ); |
|
48 | + call_user_func($this->registry, $this->newResultFormat()); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | private function newResultFormat(): ResultFormat { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare( strict_types = 1 ); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ModernTimeline\ResultFacade; |
6 | 6 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | private DIWikiPage $wikiPage, |
22 | 22 | array $propertyValueCollections |
23 | 23 | ) { |
24 | - $this->propertyValueCollections = new PropertyValueCollections( $propertyValueCollections ); |
|
24 | + $this->propertyValueCollections = new PropertyValueCollections($propertyValueCollections); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | public function getWikiPage(): DIWikiPage { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare( strict_types = 1 ); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ModernTimeline\ResultFacade; |
6 | 6 | |
@@ -11,14 +11,14 @@ discard block |
||
11 | 11 | |
12 | 12 | class ResultSimplifier { |
13 | 13 | |
14 | - public function newSubjectCollection( QueryResult $result ): SubjectCollection { |
|
14 | + public function newSubjectCollection(QueryResult $result): SubjectCollection { |
|
15 | 15 | $subjects = []; |
16 | 16 | |
17 | - foreach ( $result->getResults() as $diWikiPage ) { |
|
18 | - $subjects[] = $this->newSubject( $diWikiPage, $result->getPrintRequests(), $result ); |
|
17 | + foreach ($result->getResults() as $diWikiPage) { |
|
18 | + $subjects[] = $this->newSubject($diWikiPage, $result->getPrintRequests(), $result); |
|
19 | 19 | } |
20 | 20 | |
21 | - return SubjectCollection::newFromArray( $subjects ); |
|
21 | + return SubjectCollection::newFromArray($subjects); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | * @param QueryResult $result |
28 | 28 | * @return Subject |
29 | 29 | */ |
30 | - private function newSubject( DIWikiPage $resultPage, array $printRequests, QueryResult $result ): Subject { |
|
30 | + private function newSubject(DIWikiPage $resultPage, array $printRequests, QueryResult $result): Subject { |
|
31 | 31 | $propertyValueCollections = []; |
32 | 32 | |
33 | - foreach ( $printRequests as $printRequest ) { |
|
34 | - $dataItems = $this->newResultArray( $resultPage, $printRequest, $result )->getContent(); |
|
33 | + foreach ($printRequests as $printRequest) { |
|
34 | + $dataItems = $this->newResultArray($resultPage, $printRequest, $result)->getContent(); |
|
35 | 35 | |
36 | 36 | $propertyValueCollections[] = new PropertyValueCollection( |
37 | 37 | $printRequest, |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | ); |
40 | 40 | } |
41 | 41 | |
42 | - return new Subject( $resultPage, $propertyValueCollections ); |
|
42 | + return new Subject($resultPage, $propertyValueCollections); |
|
43 | 43 | } |
44 | 44 | |
45 | - private function newResultArray( DIWikiPage $resultPage, PrintRequest $printRequest, QueryResult $result ): ResultArray { |
|
46 | - return ResultArray::factory( $resultPage, $printRequest, $result ); |
|
45 | + private function newResultArray(DIWikiPage $resultPage, PrintRequest $printRequest, QueryResult $result): ResultArray { |
|
46 | + return ResultArray::factory($resultPage, $printRequest, $result); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare( strict_types = 1 ); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ModernTimeline\ResultFacade; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare( strict_types = 1 ); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ModernTimeline\ResultFacade; |
6 | 6 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | public function getIterator(): Traversable { |
27 | - return new \ArrayIterator( $this->propertyValueCollections ); |
|
27 | + return new \ArrayIterator($this->propertyValueCollections); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | } |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | private array $pages; |
8 | 8 | |
9 | - public function __construct( Subject ...$subjects ) { |
|
9 | + public function __construct(Subject ...$subjects) { |
|
10 | 10 | $this->pages = $subjects; |
11 | 11 | } |
12 | 12 | |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * @param Subject[] $subjects |
15 | 15 | * @return self |
16 | 16 | */ |
17 | - public static function newFromArray( array $subjects ): self { |
|
17 | + public static function newFromArray(array $subjects): self { |
|
18 | 18 | $instance = new self(); |
19 | 19 | $instance->pages = $subjects; |
20 | 20 | return $instance; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare( strict_types = 1 ); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ModernTimeline\ResultFacade; |
6 | 6 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | public function buildPresenter(): ResultPresenter { |
36 | - return call_user_func( $this->constructionFunction ); |
|
36 | + return call_user_func($this->constructionFunction); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare( strict_types = 1 ); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace ModernTimeline\ResultFacade; |
6 | 6 |