| Total Complexity | 4 | 
| Total Lines | 23 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php declare(strict_types = 1); | ||
| 6 | abstract class Post { | ||
| 7 | |||
| 8 | /** @param \WP_Post|int $post The post object or id. */ | ||
| 9 | 	protected function get_post( $post ): ?\WP_Post { | ||
| 10 | 		if ( $post instanceof \WP_Post ) { | ||
| 11 | return $post; | ||
| 12 | } | ||
| 13 | |||
| 14 | $result = get_post( $post ); | ||
| 15 | |||
| 16 | 		if ( ! $result instanceof \WP_Post ) { | ||
|  | |||
| 17 | return null; | ||
| 18 | } | ||
| 19 | |||
| 20 | return $result; | ||
| 21 | } | ||
| 22 | |||
| 23 | /** | ||
| 24 | * @param array<string> $args Args. | ||
| 25 | * @return array<\WP_Post>|array<int> | ||
| 26 | */ | ||
| 27 | 	protected function get_posts( array $args ): array { | ||
| 29 | } | ||
| 30 | |||
| 32 |