| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Page. |
||
| 4 | * |
||
| 5 | * @package App |
||
| 6 | */ |
||
| 7 | |||
| 8 | declare(strict_types=1); |
||
| 9 | |||
| 10 | namespace App\Repositories; |
||
| 11 | |||
| 12 | use App\Entities\Page as Entity; |
||
| 13 | use WPSteak\Repositories\AbstractPost; |
||
|
0 ignored issues
–
show
|
|||
| 14 | |||
| 15 | /** |
||
| 16 | * Page class. |
||
| 17 | */ |
||
| 18 | class Page extends AbstractPost { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Find one. |
||
| 22 | * |
||
| 23 | * @param \WP_Post|int $post The post object or id. |
||
| 24 | * @return Entity|null |
||
| 25 | 2 | */ |
|
| 26 | 2 | public function find_one( $post ) : ?Entity { |
|
| 27 | $post = $this->get_post( $post ); |
||
| 28 | 2 | ||
| 29 | 1 | if ( empty( $post ) ) { |
|
| 30 | return null; |
||
| 31 | } |
||
| 32 | 1 | ||
| 33 | return ( new Entity() )->set_post( $post ); |
||
| 34 | } |
||
| 35 | } |
||
| 36 |
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