Skip to content

Commit 5712649

Browse files
committed
refactor: 💡 Remove useless branch
1 parent f01040c commit 5712649

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/Contracts/LockFailedException.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Mpyw\LaravelDatabaseAdvisoryLock\Contracts;
66

77
use Illuminate\Database\QueryException;
8-
use ReflectionMethod;
98
use RuntimeException;
109

1110
/**
@@ -19,13 +18,6 @@ public function __construct(string $connectionName, string $message, string $sql
1918
{
2019
$previous = new RuntimeException($message);
2120

22-
// Laravel 10 newly introduces $connectionName parameter
23-
// https://github.com/laravel/framework/pull/43190
24-
$args = (new ReflectionMethod(parent::class, __FUNCTION__))->getNumberOfParameters() > 3
25-
? [$connectionName, $sql, $bindings, $previous]
26-
: [$sql, $bindings, $previous];
27-
28-
// @phpstan-ignore-next-line
29-
parent::__construct(...$args);
21+
parent::__construct($connectionName, $sql, $bindings, $previous);
3022
}
3123
}

0 commit comments

Comments
 (0)