1 | <?php |
||
2 | |||
3 | declare( strict_types = 1 ); |
||
4 | |||
5 | namespace ModernTimeline\ResultFacade; |
||
6 | |||
7 | use SMW\DIWikiPage; |
||
0 ignored issues
–
show
|
|||
8 | use SMW\Query\PrintRequest; |
||
0 ignored issues
–
show
The type
SMW\Query\PrintRequest was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
9 | use SMW\Query\QueryResult; |
||
0 ignored issues
–
show
The type
SMW\Query\QueryResult was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
10 | use SMW\Query\Result\ResultArray; |
||
0 ignored issues
–
show
The type
SMW\Query\Result\ResultArray was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
11 | |||
12 | class ResultSimplifier { |
||
13 | 4 | ||
14 | 4 | public function newSubjectCollection( QueryResult $result ): SubjectCollection { |
|
15 | $subjects = []; |
||
16 | 4 | ||
17 | 3 | foreach ( $result->getResults() as $diWikiPage ) { |
|
18 | $subjects[] = $this->newSubject( $diWikiPage, $result->getPrintRequests(), $result ); |
||
19 | } |
||
20 | 4 | ||
21 | return SubjectCollection::newFromArray( $subjects ); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param DIWikiPage $resultPage |
||
26 | * @param PrintRequest[] $printRequests |
||
27 | * @param QueryResult $result |
||
28 | * @return Subject |
||
29 | 3 | */ |
|
30 | 3 | private function newSubject( DIWikiPage $resultPage, array $printRequests, QueryResult $result ): Subject { |
|
31 | $propertyValueCollections = []; |
||
32 | 3 | ||
33 | 3 | foreach ( $printRequests as $printRequest ) { |
|
34 | $dataItems = $this->newResultArray( $resultPage, $printRequest, $result )->getContent(); |
||
35 | 3 | ||
36 | 3 | $propertyValueCollections[] = new PropertyValueCollection( |
|
37 | 3 | $printRequest, |
|
38 | $dataItems === false ? [] : $dataItems |
||
39 | ); |
||
40 | } |
||
41 | 3 | ||
42 | return new Subject( $resultPage, $propertyValueCollections ); |
||
43 | } |
||
44 | |||
45 | private function newResultArray( DIWikiPage $resultPage, PrintRequest $printRequest, QueryResult $result ): ResultArray { |
||
46 | return ResultArray::factory( $resultPage, $printRequest, $result ); |
||
47 | } |
||
48 | 3 | ||
49 | } |
||
50 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths