Skip to content

Commit fa42d26

Browse files
Enabled PHP 5.5 and 5.6 rector rules
1 parent 6b9328d commit fa42d26

24 files changed

+46
-23
lines changed

rector.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ parameters:
1414
- 'php52'
1515
- 'php53'
1616
- 'php54'
17+
- 'php55'
18+
- 'php56'
1719

1820
services:
1921
Rector\SOLID\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector: ~

test/Gitlab/Tests/Api/AbstractApiTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\AbstractApi;
56
use Gitlab\Client;
67
use Http\Client\HttpClient;
78
use PHPUnit\Framework\TestCase;
@@ -48,7 +49,7 @@ protected function getAbstractApiMock(array $methods = [])
4849
;
4950
$client = Client::createWithHttpClient($httpClient);
5051

51-
return $this->getMockBuilder('Gitlab\Api\AbstractApi')
52+
return $this->getMockBuilder(AbstractApi::class)
5253
->setConstructorArgs([
5354
$client,
5455
null,

test/Gitlab/Tests/Api/DeployKeysTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\DeployKeys;
56
class DeployKeysTest extends TestCase
67
{
78
/**
@@ -41,6 +42,6 @@ protected function getMultipleDeployKeysData()
4142

4243
protected function getApiClass()
4344
{
44-
return 'Gitlab\Api\DeployKeys';
45+
return DeployKeys::class;
4546
}
4647
}

test/Gitlab/Tests/Api/DeploymentsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Deployments;
56
class DeploymentsTest extends TestCase
67
{
78
/**
@@ -230,6 +231,6 @@ public function shouldShowDeployment()
230231

231232
protected function getApiClass()
232233
{
233-
return 'Gitlab\Api\Deployments';
234+
return Deployments::class;
234235
}
235236
}

test/Gitlab/Tests/Api/EnvironmentsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Environments;
56
class EnvironmentsTest extends TestCase
67
{
78
/**
@@ -190,6 +191,6 @@ public function shouldStopEnvironment()
190191

191192
protected function getApiClass()
192193
{
193-
return 'Gitlab\Api\Environments';
194+
return Environments::class;
194195
}
195196
}

test/Gitlab/Tests/Api/GroupBoardsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\GroupsBoards;
56
class GroupBoardsTest extends TestCase
67
{
78
/**
@@ -227,6 +228,6 @@ public function shouldDeleteList()
227228

228229
protected function getApiClass()
229230
{
230-
return 'Gitlab\Api\GroupsBoards';
231+
return GroupsBoards::class;
231232
}
232233
}

test/Gitlab/Tests/Api/GroupsMilestonesTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\GroupsMilestones;
56
class GroupsMilestonesTest extends TestCase
67
{
78
/**
@@ -134,6 +135,6 @@ public function shouldGetMilestonesMergeRequests()
134135

135136
protected function getApiClass()
136137
{
137-
return 'Gitlab\Api\GroupsMilestones';
138+
return GroupsMilestones::class;
138139
}
139140
}

test/Gitlab/Tests/Api/GroupsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Groups;
56
class GroupsTest extends TestCase
67
{
78
/**
@@ -523,7 +524,7 @@ public function shouldRemoveVariable()
523524

524525
protected function getApiClass()
525526
{
526-
return 'Gitlab\Api\Groups';
527+
return Groups::class;
527528
}
528529

529530
/**

test/Gitlab/Tests/Api/IssueBoardsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\IssueBoards;
56
class IssueBoardsTest extends TestCase
67
{
78
/**
@@ -227,6 +228,6 @@ public function shouldDeleteList()
227228

228229
protected function getApiClass()
229230
{
230-
return 'Gitlab\Api\IssueBoards';
231+
return IssueBoards::class;
231232
}
232233
}

test/Gitlab/Tests/Api/IssuesTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Issues;
56
class IssuesTest extends TestCase
67
{
78
/**
@@ -677,6 +678,6 @@ public function shouldGetIssueParticipants()
677678

678679
protected function getApiClass()
679680
{
680-
return 'Gitlab\Api\Issues';
681+
return Issues::class;
681682
}
682683
}

test/Gitlab/Tests/Api/JobsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,6 @@ public function shouldPlay()
225225

226226
protected function getApiClass()
227227
{
228-
return 'Gitlab\Api\Jobs';
228+
return Jobs::class;
229229
}
230230
}

test/Gitlab/Tests/Api/KeysTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Keys;
56
class KeysTest extends TestCase
67
{
78
/**
@@ -21,6 +22,6 @@ public function shouldShowKey()
2122

2223
protected function getApiClass()
2324
{
24-
return 'Gitlab\Api\Keys';
25+
return Keys::class;
2526
}
2627
}

test/Gitlab/Tests/Api/MergeRequestsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\MergeRequests;
56
class MergeRequestsTest extends TestCase
67
{
78
/**
@@ -839,7 +840,7 @@ protected function getMultipleMergeRequestsData()
839840

840841
protected function getApiClass()
841842
{
842-
return 'Gitlab\Api\MergeRequests';
843+
return MergeRequests::class;
843844
}
844845

845846
/**

test/Gitlab/Tests/Api/MilestonesTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Milestones;
56
class MilestonesTest extends TestCase
67
{
78
/**
@@ -114,6 +115,6 @@ public function shouldGetMilestonesIssues()
114115

115116
protected function getApiClass()
116117
{
117-
return 'Gitlab\Api\Milestones';
118+
return Milestones::class;
118119
}
119120
}

test/Gitlab/Tests/Api/ProjectNamespacesTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\ProjectNamespaces;
56
class ProjectNamespacesTest extends TestCase
67
{
78
/**
@@ -43,6 +44,6 @@ public function shouldShowNamespace()
4344

4445
protected function getApiClass()
4546
{
46-
return 'Gitlab\Api\ProjectNamespaces';
47+
return ProjectNamespaces::class;
4748
}
4849
}

test/Gitlab/Tests/Api/ProjectsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Projects;
56
class ProjectsTest extends TestCase
67
{
78
/**
@@ -1996,6 +1997,6 @@ public function shouldDeleteAllMergedBranches()
19961997

19971998
protected function getApiClass()
19981999
{
1999-
return 'Gitlab\Api\Projects';
2000+
return Projects::class;
20002001
}
20012002
}

test/Gitlab/Tests/Api/RepositoriesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,6 @@ public function shouldGetMergeBase()
626626

627627
protected function getApiClass()
628628
{
629-
return 'Gitlab\Api\Repositories';
629+
return Repositories::class;
630630
}
631631
}

test/Gitlab/Tests/Api/ScheduleTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Schedules;
56
class ScheduleTest extends TestCase
67
{
78
/**
@@ -123,6 +124,6 @@ public function shouldRemoveSchedule()
123124

124125
protected function getApiClass()
125126
{
126-
return 'Gitlab\Api\Schedules';
127+
return Schedules::class;
127128
}
128129
}

test/Gitlab/Tests/Api/SnippetsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Snippets;
56
class SnippetsTest extends TestCase
67
{
78
/**
@@ -236,6 +237,6 @@ public function shouldRevokeSnippetAwardEmoji()
236237

237238
protected function getApiClass()
238239
{
239-
return 'Gitlab\Api\Snippets';
240+
return Snippets::class;
240241
}
241242
}

test/Gitlab/Tests/Api/SystemHooksTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\SystemHooks;
56
class SystemHooksTest extends TestCase
67
{
78
/**
@@ -77,6 +78,6 @@ public function shouldRemoveHook()
7778

7879
protected function getApiClass()
7980
{
80-
return 'Gitlab\Api\SystemHooks';
81+
return SystemHooks::class;
8182
}
8283
}

test/Gitlab/Tests/Api/TagsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Tags;
56
class TagsTest extends TestCase
67
{
78
/**
@@ -150,6 +151,6 @@ public function releaseDataProvider()
150151

151152
protected function getApiClass()
152153
{
153-
return 'Gitlab\Api\Tags';
154+
return Tags::class;
154155
}
155156
}

test/Gitlab/Tests/Api/UsersTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Users;
56
class UsersTest extends TestCase
67
{
78
/**
@@ -721,7 +722,7 @@ public function shouldGetCurrentUserInactiveImpersonationTokens()
721722

722723
protected function getApiClass()
723724
{
724-
return 'Gitlab\Api\Users';
725+
return Users::class;
725726
}
726727

727728
/**

test/Gitlab/Tests/Api/VersionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Version;
56
class VersionTest extends TestCase
67
{
78
/**
@@ -24,6 +25,6 @@ public function shouldShowVersion()
2425

2526
protected function getApiClass()
2627
{
27-
return 'Gitlab\Api\Version';
28+
return Version::class;
2829
}
2930
}

test/Gitlab/Tests/Api/WikiTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Gitlab\Tests\Api;
44

5+
use Gitlab\Api\Wiki;
56
class WikiTest extends TestCase
67
{
78
/**
@@ -118,6 +119,6 @@ public function shouldRemoveWiki()
118119

119120
protected function getApiClass()
120121
{
121-
return 'Gitlab\Api\Wiki';
122+
return Wiki::class;
122123
}
123124
}

0 commit comments

Comments
 (0)