| 1 | <?php |
||
| 8 | abstract class Filler_Posts { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var int |
||
| 12 | */ |
||
| 13 | public $filler_count; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var array<int> |
||
| 17 | */ |
||
| 18 | public $post_ids_to_be_excluded; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var $post_id int |
||
| 22 | */ |
||
| 23 | protected $post_id; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Filler_Posts constructor. |
||
| 27 | * |
||
| 28 | * @param $post_id |
||
| 29 | */ |
||
| 30 | public function __construct( $post_id ) { |
||
| 35 | |||
| 36 | protected function get_posts_config($filler_count, $post_ids_to_be_excluded) { |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param $filler_count |
||
| 53 | * @param $post_ids_to_be_excluded |
||
| 54 | * |
||
| 55 | * @return array<\WP_Post> |
||
| 56 | */ |
||
| 57 | abstract function get_posts( $filler_count, $post_ids_to_be_excluded ); |
||
| 58 | |||
| 59 | |||
| 60 | } |
||
| 61 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.