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