@@ -42,7 +42,6 @@ public function create(Proposition $condition, $action = null)
42
42
*
43
43
* Note that, depending on your filesystem, operator namespaces are most likely case sensitive.
44
44
*
45
- *
46
45
* @param string $namespace Operator namespace
47
46
*
48
47
* @throws \InvalidArgumentException
@@ -51,7 +50,7 @@ public function create(Proposition $condition, $action = null)
51
50
*/
52
51
public function registerOperatorNamespace ($ namespace )
53
52
{
54
- if (!is_string ($ namespace )) {
53
+ if (!\ is_string ($ namespace )) {
55
54
throw new \InvalidArgumentException ('Namespace argument must be a string ' );
56
55
}
57
56
@@ -70,7 +69,7 @@ public function registerOperatorNamespace($namespace)
70
69
*/
71
70
public function logicalAnd (Proposition $ prop , Proposition $ prop2 = null )
72
71
{
73
- return new Operator \LogicalAnd (func_get_args ());
72
+ return new Operator \LogicalAnd (\ func_get_args ());
74
73
}
75
74
76
75
/**
@@ -83,7 +82,7 @@ public function logicalAnd(Proposition $prop, Proposition $prop2 = null)
83
82
*/
84
83
public function logicalOr (Proposition $ prop , Proposition $ prop2 = null )
85
84
{
86
- return new Operator \LogicalOr (func_get_args ());
85
+ return new Operator \LogicalOr (\ func_get_args ());
87
86
}
88
87
89
88
/**
@@ -108,7 +107,7 @@ public function logicalNot(Proposition $prop)
108
107
*/
109
108
public function logicalXor (Proposition $ prop , Proposition $ prop2 = null )
110
109
{
111
- return new Operator \LogicalXor (func_get_args ());
110
+ return new Operator \LogicalXor (\ func_get_args ());
112
111
}
113
112
114
113
/**
@@ -163,23 +162,22 @@ public function offsetUnset($name): void
163
162
/**
164
163
* Find an operator in the registered operator namespaces.
165
164
*
166
- *
167
165
* @param string $name
168
166
*
169
- * @throws \LogicException If a matching operator is not found.
167
+ * @throws \LogicException if a matching operator is not found
170
168
*
171
169
* @return string
172
170
*/
173
171
public function findOperator ($ name )
174
172
{
175
- $ operator = ucfirst ($ name );
176
- foreach (array_keys ($ this ->operatorNamespaces ) as $ namespace ) {
173
+ $ operator = \ ucfirst ($ name );
174
+ foreach (\ array_keys ($ this ->operatorNamespaces ) as $ namespace ) {
177
175
$ class = $ namespace .'\\' .$ operator ;
178
- if (class_exists ($ class )) {
176
+ if (\ class_exists ($ class )) {
179
177
return $ class ;
180
178
}
181
179
}
182
180
183
- throw new \LogicException (sprintf ('Unknown operator: "%s" ' , $ name ));
181
+ throw new \LogicException (\ sprintf ('Unknown operator: "%s" ' , $ name ));
184
182
}
185
183
}
0 commit comments