| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 1 | public function find_all() : Collection { |
|
| 42 | 1 | $terms = $this->get_terms( |
|
| 43 | [ |
||
| 44 | 1 | 'taxonomy' => Entity::TAXONOMY, |
|
| 45 | 'hide_empty' => false, |
||
| 46 | ] |
||
| 47 | ); |
||
| 48 | |||
| 49 | 1 | $collection = new Collection(); |
|
| 50 | |||
| 51 | 1 | foreach ( $terms as $term ) { |
|
| 52 | 1 | $collection->add_entity( ( new Entity() )->set_term( $term ) ); |
|
| 53 | } |
||
| 54 | |||
| 55 | 1 | return $collection; |
|
| 56 | } |
||
| 58 |