1 | <?php |
||
17 | class RulePluginManager extends AbstractPluginManager |
||
18 | { |
||
19 | /** |
||
20 | * Default set of rules |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | |||
25 | protected $invokableClasses = [ |
||
26 | 'between' => 'StrokerForm\Renderer\JqueryValidate\Rule\Between', |
||
27 | 'creditcard' => 'StrokerForm\Renderer\JqueryValidate\Rule\CreditCard', |
||
28 | 'digits' => 'StrokerForm\Renderer\JqueryValidate\Rule\Digits', |
||
29 | 'emailaddress' => 'StrokerForm\Renderer\JqueryValidate\Rule\EmailAddress', |
||
30 | 'greaterthan' => 'StrokerForm\Renderer\JqueryValidate\Rule\GreaterThan', |
||
31 | 'identical' => 'StrokerForm\Renderer\JqueryValidate\Rule\Identical', |
||
32 | 'lessthan' => 'StrokerForm\Renderer\JqueryValidate\Rule\LessThan', |
||
33 | 'notempty' => 'StrokerForm\Renderer\JqueryValidate\Rule\NotEmpty', |
||
34 | 'stringlength' => 'StrokerForm\Renderer\JqueryValidate\Rule\StringLength', |
||
35 | 'uri' => 'StrokerForm\Renderer\JqueryValidate\Rule\Uri', |
||
36 | 'inarray' => 'StrokerForm\Renderer\JqueryValidate\Rule\InArray', |
||
37 | 'regex' => 'StrokerForm\Renderer\JqueryValidate\Rule\Regex', |
||
38 | ]; |
||
39 | |||
40 | |||
41 | /** |
||
42 | * Constructor |
||
43 | * |
||
44 | * After invoking parent constructor, add an initializer to inject the |
||
45 | * attached renderer and translator, if any, to the currently requested helper. |
||
46 | * |
||
47 | * @param null|ConfigInterface $configuration |
||
48 | */ |
||
49 | public function __construct(ConfigInterface $configuration = null) |
||
55 | |||
56 | /** |
||
57 | * {@inheritDoc} |
||
58 | */ |
||
59 | public function validatePlugin($plugin) |
||
74 | |||
75 | /** |
||
76 | * Inject a helper instance with the registered translator |
||
77 | * |
||
78 | * @param RuleInterface $rule |
||
79 | * |
||
80 | * @return void |
||
81 | */ |
||
82 | public function injectTranslator($rule) |
||
93 | } |
||
94 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: