| Total Complexity | 11 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | trait ValidatesPostTypeTrait |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @throws InvalidArgumentException |
||
| 14 | */ |
||
| 15 | protected function assertPostType(WP_Post $post, string $postType): self |
||
| 16 | { |
||
| 17 | if ($postType !== $actual = $post->post_type) { |
||
| 18 | throw new InvalidArgumentException( |
||
| 19 | "The post type of the post must be \"{$postType}\", but it is \"{$actual}.\"", |
||
| 20 | ); |
||
| 21 | } |
||
| 22 | |||
| 23 | return $this; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @throws InvalidArgumentException |
||
| 28 | */ |
||
| 29 | protected function assertPostTypeOnQuery(WP_Query $query, string $postType): self |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
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