You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Error.php
+18-3Lines changed: 18 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -26,10 +26,25 @@ public function __construct(array $props) {
26
26
}
27
27
28
28
if ($k == 'links') {
29
-
if (!($vinstanceof Collection)) thrownew \InvalidArgumentException("Value passed with key `links` must be a JsonApi Collection containing an `about` key with a link to more information about this error.");
29
+
if (!($vinstanceof Collection)) {
30
+
thrownew \InvalidArgumentException(
31
+
"Value passed with key `links` must be a JsonApi Collection containing an `about` ".
32
+
"key with a link to more information about this error."
33
+
);
34
+
}
30
35
if (count($v) != 1 ||
31
-
!array_key_exists('about', $v) ||
32
-
(!is_string($v['about']) && !($v['about'] instanceof Link))) thrownew \InvalidArgumentException("The Collection passed as `links` must contain exactly one item, `about`, which should be a string or a Link object.");
0 commit comments