We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18de4bf commit be1584bCopy full SHA for be1584b
src/Naneau/Obfuscator/Node/Visitor/Scrambler.php
@@ -148,8 +148,13 @@ public function setIgnore(array $ignore)
148
**/
149
public function addIgnore($ignore)
150
{
151
- $this->ignore = array_merge($this->ignore, (array) $ignore);
152
-
+ if (is_string($ignore)) {
+ $this->ignore = array_merge($this->ignore, array($ignore));
153
+ } else if (is_array($ignore)) {
154
+ $this->ignore = array_merge($this->ignore, $ignore);
155
+ } else {
156
+ throw new InvalidArgumentException('Invalid ignore type passed');
157
+ }
158
return $this;
159
}
160
0 commit comments