Skip to content

Commit

Permalink
Import root namespace functions & classes, add phpdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
hollodotme committed May 10, 2018
1 parent 67b003b commit c39fb15
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Collections/RoundRobin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
namespace hollodotme\FastCGI\Collections;

use hollodotme\FastCGI\Client;
use hollodotme\FastCGI\Exceptions\ClientNotFoundException;
use hollodotme\FastCGI\Exceptions\MissingConnectionsException;
use function in_array;

/**
* Class RoundRobinConnections
Expand All @@ -15,6 +18,11 @@ final class RoundRobin extends AbstractClientCollection
{
private $nextIndex = 0;

/**
* @throws ClientNotFoundException
* @throws MissingConnectionsException
* @return Client
*/
public function getClient() : Client
{
$this->guardHasClients();
Expand All @@ -23,7 +31,7 @@ public function getClient() : Client

$this->nextIndex++;

if ( !\in_array( $this->nextIndex, $this->getIndices(), true ) )
if ( !in_array( $this->nextIndex, $this->getIndices(), true ) )
{
$this->nextIndex = 0;
}
Expand Down

0 comments on commit c39fb15

Please sign in to comment.