Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Feb 28, 2014
2 parents 2b3a6db + e5e04fa commit a6b2f22
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 45 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ php:
- 5.3.3
- 5.3
- 5.4
- 5.5
- 5.5

before_script:
- composer --prefer-source install

script: phpunit --coverage-text --verbose
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $ sudo mv composer.phar /usr/local/bin/composer
Add the following to your require block in composer.json config.

```
"wtfzdotnet/php-tmdb-api": "dev-develop"
"wtfzdotnet/php-tmdb-api": "dev-master"
```

Include Composer's autoloader:
Expand Down
2 changes: 1 addition & 1 deletion lib/Tmdb/Factory/AbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Class AbstractFactory
* @package Tmdb\Factory
*/
abstract class AbstractFactory implements FactoryInterface {
abstract class AbstractFactory {
/**
* Convert an array to an hydrated object
*
Expand Down
25 changes: 0 additions & 25 deletions lib/Tmdb/Factory/FactoryInterface.php

This file was deleted.

9 changes: 6 additions & 3 deletions lib/Tmdb/Model/Collection/Jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ function($key, $value) use ($department) {
);

if ($result && 1 === count($result)) {
return array_shift($result->toArray());
$results = $result->toArray();
return array_shift($results);
}

return $result;
Expand All @@ -56,7 +57,8 @@ function($key, $value) use ($department) {
);

if ($result && 1 === count($result)) {
$data = array_shift($result->toArray());
$results = $result->toArray();
$data = array_shift($results);

return $data->getJobList();
}
Expand All @@ -83,7 +85,8 @@ function($key, $value) use ($filterByJob) {
);

if ($result && 1 === count($result)) {
return array_shift($result->toArray());
$results = $result->toArray();
return array_shift($results);
}

return $result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ public function __construct(array $collection = array())
}
}

/**
* {@inheritdoc}
*/
abstract public function getKey();

/**
* {@inheritdoc}
*/
Expand Down
21 changes: 13 additions & 8 deletions test/Tmdb/Tests/HttpClient/HttpClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
namespace Tmdb\Tests\HttpClient;

use \Exception;
use Tmdb\Api\AbstractApi;
use Tmdb\ApiToken;
use Tmdb\Client;
Expand Down Expand Up @@ -131,7 +130,7 @@ public function shouldCallDelete()
/**
* @test
*/
public function put()
public function shouldCallPut()
{
$this->setUp();

Expand Down Expand Up @@ -184,27 +183,33 @@ public function __construct($client)
$this->client = $client;
}

public function get() {
public function get($path, array $parameters = array(), $headers = array())
{
$this->client->getHttpClient()->get('/');
}

public function head() {
public function head($path, array $parameters = array(), $headers = array())
{
$this->client->getHttpClient()->head('/');
}

public function post() {
public function post($path, $postBody = null, array $parameters = array(), $headers = array())
{
$this->client->getHttpClient()->post('/', array('id' => 1));
}

public function patch() {
public function patch($path, $body = null, array $parameters = array(), $headers = array())
{
$this->client->getHttpClient()->patch('http://www.google.com/');
}

public function delete() {
public function delete($path, $body = null, array $parameters = array(), $headers = array())
{
$this->client->getHttpClient()->delete('http://www.google.com/');
}

public function put() {
public function put($path, $body = null, array $parameters = array(), $headers = array())
{
$this->client->getHttpClient()->put('http://www.google.com/');
}

Expand Down
3 changes: 2 additions & 1 deletion test/Tmdb/Tests/Model/ImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public function shouldGetAndSet()
/**
* @var Image $subject
*/
$subject = array_pop($this->collection->toArray());
$results = $this->collection->toArray();
$subject = array_pop($results);

$this->assertEquals('/abc.jpg', $subject->getFilePath());
$this->assertEquals(1000, $subject->getWidth());
Expand Down

0 comments on commit a6b2f22

Please sign in to comment.