rules = $rules; } public function matches( \WP_Post $post ): bool { if ( array() === $this->rules ) { return true; } foreach ( $this->rules as $rule ) { if ( $rule instanceof RuleInterface && $rule->matches( $post ) ) { return true; } } return false; } }