Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
17 | abstract class AbstractPost { |
||
18 | |||
19 | /** |
||
20 | * Meta. |
||
21 | * |
||
22 | * @var MetaInterface |
||
23 | */ |
||
24 | protected $meta; |
||
25 | |||
26 | /** |
||
27 | * Construct. |
||
28 | * |
||
29 | * @param MetaInterface $meta Meta. |
||
30 | */ |
||
31 | public function __construct( MetaInterface $meta ) { |
||
32 | $this->meta = $meta; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Get post. |
||
37 | * |
||
38 | * @param integer $id Id. |
||
39 | * @return \WP_Post|null |
||
40 | */ |
||
41 | protected function get_post( int $id ) : ?\WP_Post { |
||
42 | return get_post( $id ); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Get posts. |
||
47 | * |
||
48 | * @param array $args Args. |
||
49 | * @return \WP_Post[] |
||
50 | */ |
||
51 | protected function get_posts( array $args ) : array { |
||
53 | } |
||
54 | } |
||
55 |