| Total Complexity | 3 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 9 | class Category extends AbstractTerm { |
||
| 10 | |||
| 11 | 2 | public function find_one_by_term_id( int $term_id ): ?Entity { |
|
| 12 | 2 | $term = $this->get_term( $term_id ); |
|
| 13 | |||
| 14 | 2 | if ( ! $term ) { |
|
|
|
|||
| 15 | 1 | return null; |
|
| 16 | } |
||
| 17 | |||
| 18 | 1 | return ( new Entity() )->set_term( $term ); |
|
| 19 | } |
||
| 20 | |||
| 21 | 1 | public function find_all(): Categories { |
|
| 31 | ); |
||
| 32 | } |
||
| 35 |