Skip to content

Commit

Permalink
Merge pull request #12 from localheinz/fix/more-rename
Browse files Browse the repository at this point in the history
Fix: Rename Travis to ApiClient
  • Loading branch information
WyriHaximus committed Feb 11, 2016
2 parents 1089d85 + d1513a6 commit 8c33754
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/last-10-builds-async.php
Expand Up @@ -8,7 +8,7 @@
use WyriHaximus\Travis\BuildCollection;
use WyriHaximus\Travis\Builds;
use WyriHaximus\Travis\Client;
use WyriHaximus\Travis\Travis;
use WyriHaximus\Travis\ApiClient;

require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'vendor/autoload.php';

Expand All @@ -17,7 +17,7 @@
$client = new Client(new GuzzleHandler(new GuzzleClient([
'handler' => HandlerStack::create(new HttpClientAdapter($loop)),
])));
$travis = new Travis($client);
$travis = new ApiClient($client);
$travis->repository('WyriHaximus/php-travis-client')->builds()->then(function (BuildCollection $builds) {
foreach ($builds as $build) {
//echo 'Build: #', $build->getId(), PHP_EOL;
Expand Down
4 changes: 2 additions & 2 deletions examples/last-10-builds.php
@@ -1,12 +1,12 @@
<?php

use WyriHaximus\Travis\Client;
use WyriHaximus\Travis\Travis;
use WyriHaximus\Travis\ApiClient;

require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'vendor/autoload.php';

$client = new Client();
$travis = new Travis($client);
$travis = new ApiClient($client);

foreach ($travis->repository('WyriHaximus/php-travis-client')->builds() as $build) {
echo 'Build: #', $build->getId(), PHP_EOL;
Expand Down
2 changes: 1 addition & 1 deletion src/Travis.php → src/ApiClient.php
Expand Up @@ -5,7 +5,7 @@
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

class Travis implements EndpointInterface
class ApiClient implements EndpointInterface
{
use ClientAwareTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Repository.php
Expand Up @@ -14,7 +14,7 @@ class Repository implements EndpointInterface
*/
protected $repository;

public function __construct(Travis $parent, string $repository)
public function __construct(ApiClient $parent, string $repository)
{
$this->setParent($parent);
$this->repository = $repository;
Expand Down

0 comments on commit 8c33754

Please sign in to comment.