| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 1 | public function find_by_author_id( int $author_id, int $quantity ) : Collection { |
|
| 45 | $posts = $this->get_posts( |
||
| 46 | 1 | [ |
|
| 47 | 1 | 'numberposts' => $quantity, |
|
| 48 | 'author' => $author_id, |
||
| 49 | ] |
||
| 50 | ); |
||
| 51 | 1 | ||
| 52 | $collection = new Collection(); |
||
| 53 | 1 | ||
| 54 | 1 | foreach ( $posts as $post ) { |
|
| 55 | $collection->add_entity( ( new Entity() )->set_post( $post ) ); |
||
| 56 | } |
||
| 57 | 1 | ||
| 58 | return $collection; |
||
| 59 | } |
||
| 61 |
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