diff --git a/src/Chooser/LoadLimitChooser.php b/src/Chooser/LoadLimitChooser.php index 5f42c66..fbd8277 100644 --- a/src/Chooser/LoadLimitChooser.php +++ b/src/Chooser/LoadLimitChooser.php @@ -3,7 +3,6 @@ namespace NBN\LoadBalancer\Chooser; use NBN\LoadBalancer\Exception\NoRegisteredHostException; -use NBN\LoadBalancer\Host\HostInterface; use Symfony\Component\HttpFoundation\Request; /** @@ -45,7 +44,7 @@ public function getAvailableHost(Request $request, array $hosts) if ($load < $this->loadLimit) { return $host; } - if ($currentHost == null || $load < $currentLoad) { + if ($currentHost === null || $load < $currentLoad) { $currentLoad = $load; $currentHost = $host; } diff --git a/src/Chooser/RotationChooser.php b/src/Chooser/RotationChooser.php index d6b3c61..bb30a7d 100644 --- a/src/Chooser/RotationChooser.php +++ b/src/Chooser/RotationChooser.php @@ -3,7 +3,6 @@ namespace NBN\LoadBalancer\Chooser; use NBN\LoadBalancer\Exception\NoRegisteredHostException; -use NBN\LoadBalancer\Host\HostInterface; use Symfony\Component\HttpFoundation\Request; /** diff --git a/src/LoadBalancer.php b/src/LoadBalancer.php index 9797009..47d8781 100644 --- a/src/LoadBalancer.php +++ b/src/LoadBalancer.php @@ -76,7 +76,7 @@ public function handleRequest(Request $request) } $host = $this->chooser->getAvailableHost($request, $this->hosts); - if ($host == null) { + if ($host === null) { throw new NoAvailableHostException(); }