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: pkg/snsqs/SnsQsContext.php
+9-20
Original file line number
Diff line number
Diff line change
@@ -53,23 +53,15 @@ public function __construct($snsContext, $sqsContext)
53
53
} elseif (is_callable($snsContext)) {
54
54
$this->snsContextFactory = $snsContext;
55
55
} else {
56
-
thrownew \InvalidArgumentException(sprintf(
57
-
'The $snsContext argument must be either %s or callable that returns %s once called.',
58
-
SnsContext::class,
59
-
SnsContext::class
60
-
));
56
+
thrownew \InvalidArgumentException(sprintf('The $snsContext argument must be either %s or callable that returns %s once called.', SnsContext::class, SnsContext::class));
61
57
}
62
58
63
59
if ($sqsContextinstanceof SqsContext) {
64
60
$this->sqsContext = $sqsContext;
65
61
} elseif (is_callable($sqsContext)) {
66
62
$this->sqsContextFactory = $sqsContext;
67
63
} else {
68
-
thrownew \InvalidArgumentException(sprintf(
69
-
'The $sqsContext argument must be either %s or callable that returns %s once called.',
70
-
SqsContext::class,
71
-
SqsContext::class
72
-
));
64
+
thrownew \InvalidArgumentException(sprintf('The $sqsContext argument must be either %s or callable that returns %s once called.', SqsContext::class, SqsContext::class));
73
65
}
74
66
}
75
67
@@ -137,6 +129,11 @@ public function declareTopic(SnsQsTopic $topic): void
thrownew \LogicException(sprintf('The factory must return instance of %s. It returned %s', SnsContext::class, is_object($context) ? get_class($context) : gettype($context)));
189
182
}
190
183
191
184
$this->snsContext = $context;
@@ -199,11 +192,7 @@ private function getSqsContext(): SqsContext
thrownew \LogicException(sprintf('The factory must return instance of %s. It returned %s', SqsContext::class, is_object($context) ? get_class($context) : gettype($context)));
0 commit comments