Remove unknown Rule type
parent
6e04991489
commit
75a8677e8a
|
@ -125,7 +125,7 @@ abstract class Rule
|
|||
}
|
||||
|
||||
/**
|
||||
* @param 255|RuleSet::TYPE_* $type
|
||||
* @param RuleSet::TYPE_* $type
|
||||
* @return void
|
||||
*/
|
||||
public function setType($type)
|
||||
|
|
|
@ -32,9 +32,8 @@ class RuleSet implements \IteratorAggregate, \Countable
|
|||
*/
|
||||
public $ruleById = array();
|
||||
|
||||
/** @var array<255|0|1|4, string> */
|
||||
/** @var array<0|1|4, string> */
|
||||
protected static $types = array(
|
||||
255 => 'UNKNOWN',
|
||||
self::TYPE_PACKAGE => 'PACKAGE',
|
||||
self::TYPE_REQUEST => 'REQUEST',
|
||||
self::TYPE_LEARNED => 'LEARNED',
|
||||
|
@ -57,7 +56,7 @@ class RuleSet implements \IteratorAggregate, \Countable
|
|||
}
|
||||
|
||||
/**
|
||||
* @param 255|self::TYPE_* $type
|
||||
* @param self::TYPE_* $type
|
||||
* @return void
|
||||
*/
|
||||
public function add(Rule $rule, $type)
|
||||
|
@ -182,7 +181,6 @@ class RuleSet implements \IteratorAggregate, \Countable
|
|||
public function getTypes()
|
||||
{
|
||||
$types = self::$types;
|
||||
unset($types[255]);
|
||||
|
||||
return array_keys($types);
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ class RuleSetGenerator
|
|||
* To be able to directly pass in the result of one of the rule creation
|
||||
* methods null is allowed which will not insert a rule.
|
||||
*
|
||||
* @param 255|RuleSet::TYPE_* $type A TYPE_* constant defining the rule type
|
||||
* @param RuleSet::TYPE_* $type A TYPE_* constant defining the rule type
|
||||
* @param Rule $newRule The rule about to be added
|
||||
*
|
||||
* @return void
|
||||
|
|
Loading…
Reference in New Issue