| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 65 | public function results() |
||
| 66 | { |
||
| 67 | if ($this->model) { |
||
| 68 | $this->query->set('post_type', $this->model->post_type); |
||
| 69 | $this->query->set('fields', ''); // return objects |
||
| 70 | } |
||
| 71 | |||
| 72 | $collection = Collection::make($this->query->get_posts()); |
||
| 73 | $modelClass = $this->model ? get_class($this->model) : Post::class; |
||
| 74 | |||
| 75 | return $collection->transform(function($post) use ($modelClass) { |
||
| 76 | return new $modelClass($post); |
||
| 77 | }); |
||
| 78 | } |
||
| 79 | |||
| 105 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.