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 77cbb14 commit 92472abCopy full SHA for 92472ab
ImportDetection/Symbol.php
@@ -8,7 +8,12 @@ class Symbol {
8
9
public function __construct(array $tokens) {
10
if (empty($tokens)) {
11
- throw new \Exception('Symbols cannot be empty');
+ throw new \Exception('Cannot construct Symbol with no tokens');
12
+ }
13
+ foreach ($tokens as $token) {
14
+ if (empty($token) || ! is_array($token)) {
15
+ throw new \Exception('Cannot construct Symbol with invalid token: ' . var_export($token, true));
16
17
}
18
$this->tokens = $tokens;
19
0 commit comments