Skip to content

Commit 1473fb6

Browse files
committed
Small refactors.
1 parent 1056fcf commit 1473fb6

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

composer.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

guzzle/src/Adri/GithubProjectGuzzle.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public function __construct($project)
3030

3131
public function getInfo()
3232
{
33-
$info = null;
34-
3533
try {
3634
$request = $this->client->get('/repos/'. $this->projectName);
3735
$response = $request->send();

guzzle/test/Adri/GithubProjectGuzzleTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class GithubProjectGuzzleTest extends \PHPUnit_Framework_TestCase
1616
public function testGithubInfoForExistingProject()
1717
{
1818
$githubProject = new GithubProjectGuzzle('adri/php-vcr');
19-
$info = $githubProject ->getInfo();
19+
$info = $githubProject->getInfo();
2020

2121
$this->assertTrue(is_array($info), 'Response is not an array.');
2222
$this->assertArrayHasKey('full_name', $info, "Key 'full_name' not found.");
@@ -31,7 +31,7 @@ public function testGithubInfoForExistingProject()
3131
public function testGithubInfoForNonExistingProject()
3232
{
3333
$githubProject = new GithubProjectGuzzle('adri/random_stuff');
34-
$info = $githubProject ->getInfo();
34+
$info = $githubProject->getInfo();
3535

3636
$this->assertNull($info, 'Response is not null.');
3737
}

guzzle/test/fixtures/github_adri_php-vcr.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@
1111
status: 200
1212
headers:
1313
Server: GitHub.com
14-
Date: 'Thu, 25 Jul 2013 13:28:11 GMT'
14+
Date: 'Thu, 25 Jul 2013 14:16:33 GMT'
1515
Content-Type: 'application/json; charset=utf-8'
1616
Status: '200 OK'
1717
X-RateLimit-Limit: '60'
18-
X-RateLimit-Remaining: '56'
18+
X-RateLimit-Remaining: '42'
1919
X-RateLimit-Reset: '1374762413'
2020
Cache-Control: 'public, max-age=60, s-maxage=60'
21-
Last-Modified: 'Tue, 23 Jul 2013 19:01:07 GMT'
22-
ETag: '"cca944c6de4aabc601b33be6ca87be08"'
21+
Last-Modified: 'Thu, 25 Jul 2013 14:00:44 GMT'
22+
ETag: '"925b93b102f17af2fcbe5dbb2beca047"'
2323
Vary: Accept
2424
X-GitHub-Media-Type: 'github.beta; format=json'
2525
X-Content-Type-Options: nosniff
2626
Content-Length: '4386'
2727
Access-Control-Allow-Credentials: 'true'
2828
Access-Control-Expose-Headers: 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes'
2929
Access-Control-Allow-Origin: '*'
30-
body: '{"id":8245842,"name":"php-vcr","full_name":"adri/php-vcr","owner":{"login":"adri","id":133832,"avatar_url":"https://secure.gravatar.com/avatar/93c1d89e7faf824d34b98dbaf29f85e0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","gravatar_id":"93c1d89e7faf824d34b98dbaf29f85e0","url":"https://api.github.com/users/adri","html_url":"https://github.com/adri","followers_url":"https://api.github.com/users/adri/followers","following_url":"https://api.github.com/users/adri/following{/other_user}","gists_url":"https://api.github.com/users/adri/gists{/gist_id}","starred_url":"https://api.github.com/users/adri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adri/subscriptions","organizations_url":"https://api.github.com/users/adri/orgs","repos_url":"https://api.github.com/users/adri/repos","events_url":"https://api.github.com/users/adri/events{/privacy}","received_events_url":"https://api.github.com/users/adri/received_events","type":"User"},"private":false,"html_url":"https://github.com/adri/php-vcr","description":"Record your test suite''s HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.","fork":false,"url":"https://api.github.com/repos/adri/php-vcr","forks_url":"https://api.github.com/repos/adri/php-vcr/forks","keys_url":"https://api.github.com/repos/adri/php-vcr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adri/php-vcr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adri/php-vcr/teams","hooks_url":"https://api.github.com/repos/adri/php-vcr/hooks","issue_events_url":"https://api.github.com/repos/adri/php-vcr/issues/events{/number}","events_url":"https://api.github.com/repos/adri/php-vcr/events","assignees_url":"https://api.github.com/repos/adri/php-vcr/assignees{/user}","branches_url":"https://api.github.com/repos/adri/php-vcr/branches{/branch}","tags_url":"https://api.github.com/repos/adri/php-vcr/tags","blobs_url":"https://api.github.com/repos/adri/php-vcr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adri/php-vcr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adri/php-vcr/git/refs{/sha}","trees_url":"https://api.github.com/repos/adri/php-vcr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adri/php-vcr/statuses/{sha}","languages_url":"https://api.github.com/repos/adri/php-vcr/languages","stargazers_url":"https://api.github.com/repos/adri/php-vcr/stargazers","contributors_url":"https://api.github.com/repos/adri/php-vcr/contributors","subscribers_url":"https://api.github.com/repos/adri/php-vcr/subscribers","subscription_url":"https://api.github.com/repos/adri/php-vcr/subscription","commits_url":"https://api.github.com/repos/adri/php-vcr/commits{/sha}","git_commits_url":"https://api.github.com/repos/adri/php-vcr/git/commits{/sha}","comments_url":"https://api.github.com/repos/adri/php-vcr/comments{/number}","issue_comment_url":"https://api.github.com/repos/adri/php-vcr/issues/comments/{number}","contents_url":"https://api.github.com/repos/adri/php-vcr/contents/{+path}","compare_url":"https://api.github.com/repos/adri/php-vcr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adri/php-vcr/merges","archive_url":"https://api.github.com/repos/adri/php-vcr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adri/php-vcr/downloads","issues_url":"https://api.github.com/repos/adri/php-vcr/issues{/number}","pulls_url":"https://api.github.com/repos/adri/php-vcr/pulls{/number}","milestones_url":"https://api.github.com/repos/adri/php-vcr/milestones{/number}","notifications_url":"https://api.github.com/repos/adri/php-vcr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adri/php-vcr/labels{/name}","created_at":"2013-02-17T04:13:19Z","updated_at":"2013-07-23T19:01:07Z","pushed_at":"2013-07-23T19:01:02Z","git_url":"git://github.com/adri/php-vcr.git","ssh_url":"git@github.com:adri/php-vcr.git","clone_url":"https://github.com/adri/php-vcr.git","svn_url":"https://github.com/adri/php-vcr","homepage":null,"size":389,"watchers_count":12,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":12,"master_branch":"master","default_branch":"master","network_count":3}'
30+
body: '{"id":8245842,"name":"php-vcr","full_name":"adri/php-vcr","owner":{"login":"adri","id":133832,"avatar_url":"https://secure.gravatar.com/avatar/93c1d89e7faf824d34b98dbaf29f85e0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png","gravatar_id":"93c1d89e7faf824d34b98dbaf29f85e0","url":"https://api.github.com/users/adri","html_url":"https://github.com/adri","followers_url":"https://api.github.com/users/adri/followers","following_url":"https://api.github.com/users/adri/following{/other_user}","gists_url":"https://api.github.com/users/adri/gists{/gist_id}","starred_url":"https://api.github.com/users/adri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adri/subscriptions","organizations_url":"https://api.github.com/users/adri/orgs","repos_url":"https://api.github.com/users/adri/repos","events_url":"https://api.github.com/users/adri/events{/privacy}","received_events_url":"https://api.github.com/users/adri/received_events","type":"User"},"private":false,"html_url":"https://github.com/adri/php-vcr","description":"Record your test suite''s HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.","fork":false,"url":"https://api.github.com/repos/adri/php-vcr","forks_url":"https://api.github.com/repos/adri/php-vcr/forks","keys_url":"https://api.github.com/repos/adri/php-vcr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adri/php-vcr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adri/php-vcr/teams","hooks_url":"https://api.github.com/repos/adri/php-vcr/hooks","issue_events_url":"https://api.github.com/repos/adri/php-vcr/issues/events{/number}","events_url":"https://api.github.com/repos/adri/php-vcr/events","assignees_url":"https://api.github.com/repos/adri/php-vcr/assignees{/user}","branches_url":"https://api.github.com/repos/adri/php-vcr/branches{/branch}","tags_url":"https://api.github.com/repos/adri/php-vcr/tags","blobs_url":"https://api.github.com/repos/adri/php-vcr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adri/php-vcr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adri/php-vcr/git/refs{/sha}","trees_url":"https://api.github.com/repos/adri/php-vcr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adri/php-vcr/statuses/{sha}","languages_url":"https://api.github.com/repos/adri/php-vcr/languages","stargazers_url":"https://api.github.com/repos/adri/php-vcr/stargazers","contributors_url":"https://api.github.com/repos/adri/php-vcr/contributors","subscribers_url":"https://api.github.com/repos/adri/php-vcr/subscribers","subscription_url":"https://api.github.com/repos/adri/php-vcr/subscription","commits_url":"https://api.github.com/repos/adri/php-vcr/commits{/sha}","git_commits_url":"https://api.github.com/repos/adri/php-vcr/git/commits{/sha}","comments_url":"https://api.github.com/repos/adri/php-vcr/comments{/number}","issue_comment_url":"https://api.github.com/repos/adri/php-vcr/issues/comments/{number}","contents_url":"https://api.github.com/repos/adri/php-vcr/contents/{+path}","compare_url":"https://api.github.com/repos/adri/php-vcr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adri/php-vcr/merges","archive_url":"https://api.github.com/repos/adri/php-vcr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adri/php-vcr/downloads","issues_url":"https://api.github.com/repos/adri/php-vcr/issues{/number}","pulls_url":"https://api.github.com/repos/adri/php-vcr/pulls{/number}","milestones_url":"https://api.github.com/repos/adri/php-vcr/milestones{/number}","notifications_url":"https://api.github.com/repos/adri/php-vcr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adri/php-vcr/labels{/name}","created_at":"2013-02-17T04:13:19Z","updated_at":"2013-07-25T14:00:44Z","pushed_at":"2013-07-25T14:00:39Z","git_url":"git://github.com/adri/php-vcr.git","ssh_url":"git@github.com:adri/php-vcr.git","clone_url":"https://github.com/adri/php-vcr.git","svn_url":"https://github.com/adri/php-vcr","homepage":null,"size":392,"watchers_count":12,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":12,"master_branch":"master","default_branch":"master","network_count":3}'
3131
-
3232
request:
3333
method: GET
@@ -40,11 +40,11 @@
4040
status: 404
4141
headers:
4242
Server: GitHub.com
43-
Date: 'Thu, 25 Jul 2013 13:53:12 GMT'
43+
Date: 'Thu, 25 Jul 2013 14:26:39 GMT'
4444
Content-Type: 'application/json; charset=utf-8'
4545
Status: '404 Not Found'
4646
X-RateLimit-Limit: '60'
47-
X-RateLimit-Remaining: '53'
47+
X-RateLimit-Remaining: '29'
4848
X-RateLimit-Reset: '1374762413'
4949
X-GitHub-Media-Type: 'github.beta; format=json'
5050
X-Content-Type-Options: nosniff

0 commit comments

Comments
 (0)