rules = $rules; } /** * Retrieve the value of a rule by name * * @param string $rule_name name of the rule to retrieve value. * @return mixed|null */ public function get_rule( string $rule_name ) { if ( ! isset( $this->rules[ $rule_name ] ) ) { return null; } return $this->rules[ $rule_name ]; } }