Skip to content

Commit a886a1b

Browse files
committed
Throw exception if unknown auth method is used.
Removed ambiguous phpdocs from tests.
1 parent eb1702c commit a886a1b

40 files changed

+13
-195
lines changed

lib/Github/HttpClient/Listener/AuthListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public function preSend(RequestInterface $request)
9090

9191
$request->fromUrl(new Url($url));
9292
break;
93+
94+
default:
95+
throw new InvalidArgumentException(sprintf('Unknown method called "%s".', $this->method));
9396
}
9497
}
9598

test/Github/Tests/Api/AbstractApiTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Api\AbstractApi;
66

7-
/**
8-
* AbstractApi test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class AbstractApiTest extends \PHPUnit_Framework_TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUser/DeployKeysTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* CurrentUser deploy keys api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class DeployKeysTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUser/EmailsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* CurrentUser emails api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class EmailsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUser/FollowersTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* CurrentUser followers api test case
9-
*
10-
* @author Joseph Bielawski <stloyd@gmail.com>
11-
*/
127
class FollowersTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUser/WatchersTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* CurrentUser watchers api test case
9-
*
10-
* @author Joseph Bielawski <stloyd@gmail.com>
11-
*/
127
class WatchersTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUserTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* CurrentUser api test case
7-
*
8-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
9-
*/
105
class CurrentUserTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/GistsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* Gist api test case
7-
*
8-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
9-
*/
105
class GistsTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/GitData/BlobsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* GitData blobs api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class BlobsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/GitData/CommitsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* GitData commits api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class CommitsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/GitData/ReferencesTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* GitData references api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class ReferencesTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/GitData/TagsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* GitData tags api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class TagsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/GitData/TreesTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* GitData trees api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class TreesTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/GitDataTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* GitData api test case
7-
*
8-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
9-
*/
105
class GitDataTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/Issue/CommentsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Issue comments api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class CommentsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Issue/EventsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Issue events api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class EventsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Issue/LabelsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Issue labels api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class LabelsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Issue/MilestonesTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Issue milestones api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class MilestonesTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/IssueTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* Issue api test case
7-
*
8-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
9-
*/
105
class IssueTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/MarkdownTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* Markdown api test case
7-
*
8-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
9-
*/
105
class MarkdownTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/Organization/MembersTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Organization members api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class MembersTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Organization/TeamsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Organization teams api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class TeamsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/OrganizationTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* Organization api test case
7-
*
8-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
9-
*/
105
class OrganizationTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/PullRequestTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* PR api test case
7-
*
8-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
9-
*/
105
class PullRequestTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/RepoTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* Repository api test case
7-
*
8-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
9-
*/
105
class RepoTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/Repository/CollaboratorsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Repository collaborators api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class CollaboratorsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Repository/CommentsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Repository comments api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class CommentsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Repository/CommitsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Repository commits api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class CommitsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Repository/ContentsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Repository contents api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class ContentsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Repository/DeployKeysTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Repository keys api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class DeployKeysTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Repository/DownloadsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Repository downloads api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class DownloadsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Repository/ForksTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Repository forks api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class ForksTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/Repository/HooksTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* Repository hooks api test case
9-
*
10-
* @author Leszek Prabucki <leszek.prabucki@gmail.com>
11-
*/
127
class HooksTest extends TestCase
138
{
149
/**

0 commit comments

Comments
 (0)