Skip to content

Commit 2beec5d

Browse files
authored
[9.x] Used str_contains instead of strpos. (#40207)
* Used `str_contains` instead of `strpos`. * Used `str_contains` instead of `strpos`.
1 parent 79952ac commit 2beec5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Container/BoundMethod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected static function getMethodDependencies($container, $callback, array $pa
137137
*/
138138
protected static function getCallReflector($callback)
139139
{
140-
if (is_string($callback) && strpos($callback, '::') !== false) {
140+
if (is_string($callback) && str_contains($callback, '::')) {
141141
$callback = explode('::', $callback);
142142
} elseif (is_object($callback) && ! $callback instanceof Closure) {
143143
$callback = [$callback, '__invoke'];
@@ -191,6 +191,6 @@ protected static function addDependencyForCallParameter($container, $parameter,
191191
*/
192192
protected static function isCallableWithAtSign($callback)
193193
{
194-
return is_string($callback) && strpos($callback, '@') !== false;
194+
return is_string($callback) && str_contains($callback, '@');
195195
}
196196
}

0 commit comments

Comments
 (0)