Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Bastien committed Jul 13, 2016
1 parent c74fde2 commit 68a47b3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Chooser/LoadLimitChooser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace NBN\LoadBalancer\Chooser;

use NBN\LoadBalancer\Exception\NoRegisteredHostException;
use NBN\LoadBalancer\Host\HostInterface;
use Symfony\Component\HttpFoundation\Request;

/**
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion src/Chooser/RotationChooser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace NBN\LoadBalancer\Chooser;

use NBN\LoadBalancer\Exception\NoRegisteredHostException;
use NBN\LoadBalancer\Host\HostInterface;
use Symfony\Component\HttpFoundation\Request;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/LoadBalancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 68a47b3

Please sign in to comment.