FailRuleProcessor.php
| 1 | <?php |
| 2 | /** |
| 3 | * Rule processor that fails. |
| 4 | */ |
| 5 | |
| 6 | namespace Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors; |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | /** |
| 11 | * Rule processor that fails. |
| 12 | */ |
| 13 | class FailRuleProcessor implements RuleProcessorInterface { |
| 14 | /** |
| 15 | * Fails the rule. |
| 16 | * |
| 17 | * @param object $rule The specific rule being processed by this rule processor. |
| 18 | * @param object $stored_state Stored state. |
| 19 | * |
| 20 | * @return bool Always false. |
| 21 | */ |
| 22 | public function process( $rule, $stored_state ) { |
| 23 | return false; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Validates the rule. |
| 28 | * |
| 29 | * @param object $rule The rule to validate. |
| 30 | * |
| 31 | * @return bool Pass/fail. |
| 32 | */ |
| 33 | public function validate( $rule ) { |
| 34 | return true; |
| 35 | } |
| 36 | } |
| 37 |