Page MenuHomeDevCentral

D2673.diff
No OneTemporary

D2673.diff

diff --git a/app/Analyzers/GitHub/Events/Event.php b/app/Analyzers/GitHub/Events/Event.php
--- a/app/Analyzers/GitHub/Events/Event.php
+++ b/app/Analyzers/GitHub/Events/Event.php
@@ -34,7 +34,7 @@
* @return string The event class name (e.g. CommitCommentEvent)
*/
public static function getClass ($eventName) {
- return __NAMESPACE__ . '\\' . studly_case($eventName) . 'Event';
+ return __NAMESPACE__ . '\\' . \Illuminate\Support\Str::studly($eventName) . 'Event';
}
/**
diff --git a/app/Analyzers/GitHub/Events/WithRepoAndBranch.php b/app/Analyzers/GitHub/Events/WithRepoAndBranch.php
--- a/app/Analyzers/GitHub/Events/WithRepoAndBranch.php
+++ b/app/Analyzers/GitHub/Events/WithRepoAndBranch.php
@@ -28,7 +28,7 @@
return "";
}
- if (starts_with($branch, "refs/heads/")) {
+ if (\Illuminate\Support\Str::startsWith($branch, "refs/heads/")) {
$branch = substr($branch, 11);
}
diff --git a/app/Analyzers/ItemGroupMapping.php b/app/Analyzers/ItemGroupMapping.php
--- a/app/Analyzers/ItemGroupMapping.php
+++ b/app/Analyzers/ItemGroupMapping.php
@@ -42,7 +42,7 @@
string $pattern,
string $item
) : bool {
- return str_is($pattern, $item);
+ return \Illuminate\Support\Str::is($pattern, $item);
}
/**
diff --git a/app/Phabricator/PhabricatorStory.php b/app/Phabricator/PhabricatorStory.php
--- a/app/Phabricator/PhabricatorStory.php
+++ b/app/Phabricator/PhabricatorStory.php
@@ -321,7 +321,7 @@
return "id";
}
- if (starts_with($key, "story") && strlen($key) > 5) {
+ if (\Illuminate\Support\Str::startsWith($key, "story") && strlen($key) > 5) {
return lcfirst(substr($key, 5));
}
diff --git a/composer.json b/composer.json
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,7 @@
"type": "project",
"require": {
"php": ">=7.1.0",
- "laravel/framework": "5.3.*",
+ "laravel/framework": "5.8.*",
"guzzlehttp/guzzle": "^6.2",
"keruald/dockerhub": "^0.0.3",
"keruald/github": "^0.2.1",
@@ -23,16 +23,12 @@
"require-dev": {
"phan/phan": "^3.2.2",
"fzaninotto/faker": "~1.4",
- "mockery/mockery": "0.9.*",
- "pdepend/pdepend": "^2.4.1",
- "phploc/phploc": "^3.0.1",
- "phpmd/phpmd" : "@stable",
- "phpunit/phpunit": "~5.4",
- "phpspec/phpspec": "~2.1",
- "sebastian/phpcpd": "^2.0.4",
+ "mockery/mockery": "^1.5.0",
+ "phpunit/phpunit": "~8.0",
"squizlabs/php_codesniffer": "2.*",
"symfony/css-selector": "~3.0",
- "symfony/dom-crawler": "~3.0"
+ "symfony/dom-crawler": "~3.0",
+ "rector/rector": "^0.12.20"
},
"autoload": {
"psr-4": {
@@ -55,6 +51,9 @@
]
},
"config": {
- "preferred-install": "dist"
+ "preferred-install": "dist",
+ "allow-plugins": {
+ "kylekatarnls/update-helper": true
+ }
}
}
diff --git a/tests/Actions/AMQPActionTest.php b/tests/Actions/AMQPActionTest.php
--- a/tests/Actions/AMQPActionTest.php
+++ b/tests/Actions/AMQPActionTest.php
@@ -11,7 +11,7 @@
protected $action;
- public function setUp () {
+ public function setUp (): void {
$this->action = new AMQPAction(
'method',
'target'
diff --git a/tests/Actions/ActionErrorTest.php b/tests/Actions/ActionErrorTest.php
--- a/tests/Actions/ActionErrorTest.php
+++ b/tests/Actions/ActionErrorTest.php
@@ -11,7 +11,7 @@
protected $actionError;
- public function setUp () {
+ public function setUp () : void {
$ex = new \RuntimeException('Lorem ipsum dolor');
$this->actionError = new ActionError($ex);
}
diff --git a/tests/Actions/ActionsReportTest.php b/tests/Actions/ActionsReportTest.php
--- a/tests/Actions/ActionsReportTest.php
+++ b/tests/Actions/ActionsReportTest.php
@@ -13,7 +13,7 @@
protected $report;
- public function setUp () {
+ public function setUp () : void {
$this->report = new ActionsReport();
}
diff --git a/tests/Actions/NotifyNewCommitsActionTest.php b/tests/Actions/NotifyNewCommitsActionTest.php
--- a/tests/Actions/NotifyNewCommitsActionTest.php
+++ b/tests/Actions/NotifyNewCommitsActionTest.php
@@ -11,7 +11,7 @@
protected $action;
- public function setUp () {
+ public function setUp () : void {
$this->action = new NotifyNewCommitsAction(
'QUUX'
);
diff --git a/tests/Actions/TriggerDockerHubBuildActionTest.php b/tests/Actions/TriggerDockerHubBuildActionTest.php
--- a/tests/Actions/TriggerDockerHubBuildActionTest.php
+++ b/tests/Actions/TriggerDockerHubBuildActionTest.php
@@ -11,7 +11,7 @@
protected $action;
- public function setUp () {
+ public function setUp () : void {
$this->action = new TriggerDockerHubBuildAction(
'acme/foo'
);
diff --git a/tests/Analyzers/GitHub/Events/CreateEventTest.php b/tests/Analyzers/GitHub/Events/CreateEventTest.php
--- a/tests/Analyzers/GitHub/Events/CreateEventTest.php
+++ b/tests/Analyzers/GitHub/Events/CreateEventTest.php
@@ -11,7 +11,7 @@
*/
private $event;
- public function setUp () {
+ public function setUp () : void {
$payload = new \stdClass;
$payload->repository = new \stdClass;
$payload->repository->full_name = 'baxterthehacker/public-repo';
diff --git a/tests/Analyzers/GitHub/Events/DeleteEventTest.php b/tests/Analyzers/GitHub/Events/DeleteEventTest.php
--- a/tests/Analyzers/GitHub/Events/DeleteEventTest.php
+++ b/tests/Analyzers/GitHub/Events/DeleteEventTest.php
@@ -11,7 +11,7 @@
*/
private $event;
- public function setUp () {
+ public function setUp () : void {
$payload = new \stdClass;
$payload->repository = new \stdClass;
$payload->repository->full_name = 'baxterthehacker/public-repo';
diff --git a/tests/Analyzers/GitHub/Events/IssueCommentEventTest.php b/tests/Analyzers/GitHub/Events/IssueCommentEventTest.php
--- a/tests/Analyzers/GitHub/Events/IssueCommentEventTest.php
+++ b/tests/Analyzers/GitHub/Events/IssueCommentEventTest.php
@@ -12,7 +12,7 @@
*/
private $payload;
- public function setUp () {
+ public function setUp () : void {
$filename = __DIR__ . "/../../../data/payloads/GitHubEvents/issue_comment.json";
$this->payload = json_decode(file_get_contents($filename));
diff --git a/tests/Analyzers/GitHub/Events/PullRequestEventTest.php b/tests/Analyzers/GitHub/Events/PullRequestEventTest.php
--- a/tests/Analyzers/GitHub/Events/PullRequestEventTest.php
+++ b/tests/Analyzers/GitHub/Events/PullRequestEventTest.php
@@ -12,7 +12,7 @@
*/
private $payload;
- public function setUp () {
+ public function setUp () : void {
$filename = __DIR__ . "/../../../data/payloads/GitHubEvents/pull_request.json";
$this->payload = json_decode(file_get_contents($filename));
diff --git a/tests/Analyzers/GitHub/Events/PushEventTest.php b/tests/Analyzers/GitHub/Events/PushEventTest.php
--- a/tests/Analyzers/GitHub/Events/PushEventTest.php
+++ b/tests/Analyzers/GitHub/Events/PushEventTest.php
@@ -12,7 +12,7 @@
*/
private $payloads;
- public function setUp () {
+ public function setUp () : void {
$payloadsToPrepare = [
'0' => 'GitHubPushForceZeroPayload.json',
'1' => 'GitHubEvents/push.json',
diff --git a/tests/Analyzers/GitHub/Events/RepositoryEventTest.php b/tests/Analyzers/GitHub/Events/RepositoryEventTest.php
--- a/tests/Analyzers/GitHub/Events/RepositoryEventTest.php
+++ b/tests/Analyzers/GitHub/Events/RepositoryEventTest.php
@@ -12,7 +12,7 @@
*/
private $payload;
- public function setUp () {
+ public function setUp () : void {
$filename = __DIR__ . "/../../../data/payloads/GitHubEvents/repository.json";
$this->payload = json_decode(file_get_contents($filename));
diff --git a/tests/Analyzers/GitHub/Events/StatusEventTest.php b/tests/Analyzers/GitHub/Events/StatusEventTest.php
--- a/tests/Analyzers/GitHub/Events/StatusEventTest.php
+++ b/tests/Analyzers/GitHub/Events/StatusEventTest.php
@@ -12,7 +12,7 @@
*/
private $payload;
- public function setUp () {
+ public function setUp () : void {
$filename = __DIR__ . "/../../../data/payloads/GitHubEvents/status.json";
$this->payload = json_decode(file_get_contents($filename));
diff --git a/tests/Analyzers/GitHub/Events/UnknownEventTest.php b/tests/Analyzers/GitHub/Events/UnknownEventTest.php
--- a/tests/Analyzers/GitHub/Events/UnknownEventTest.php
+++ b/tests/Analyzers/GitHub/Events/UnknownEventTest.php
@@ -12,7 +12,7 @@
*/
private $event;
- public function setUp () {
+ public function setUp () : void {
$filename = __DIR__ . "/../../../data/payloads/GitHubEvents/push.json";
$payload = json_decode(file_get_contents($filename));
$this->event = new UnknownEvent("quux", $payload);
diff --git a/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php b/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php
--- a/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php
+++ b/tests/Analyzers/GitHub/GitHubPayloadAnalyzerTest.php
@@ -30,7 +30,7 @@
/**
* Prepares the tests
*/
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->unknownEventAnalyzer = new GitHubPayloadAnalyzer(
diff --git a/tests/Analyzers/Jenkins/JenkinsPayloadAnalyzerConfigurationTest.php b/tests/Analyzers/Jenkins/JenkinsPayloadAnalyzerConfigurationTest.php
--- a/tests/Analyzers/Jenkins/JenkinsPayloadAnalyzerConfigurationTest.php
+++ b/tests/Analyzers/Jenkins/JenkinsPayloadAnalyzerConfigurationTest.php
@@ -20,7 +20,7 @@
/**
* Prepares the test
*/
- public function setUp () {
+ public function setUp () : void {
$filename = __DIR__ . '/../../data/JenkinsPayloadAnalyzer/Nasqueron.json';
$mapper = new \JsonMapper();
$this->configuration = $mapper->map(
diff --git a/tests/Analyzers/Jenkins/JenkinsPayloadAnalyzerTest.php b/tests/Analyzers/Jenkins/JenkinsPayloadAnalyzerTest.php
--- a/tests/Analyzers/Jenkins/JenkinsPayloadAnalyzerTest.php
+++ b/tests/Analyzers/Jenkins/JenkinsPayloadAnalyzerTest.php
@@ -23,7 +23,7 @@
/**
* Prepares the test
*/
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$filename = __DIR__ . '/../../data/payloads/JenkinsToIgnorePayload.json';
diff --git a/tests/Analyzers/PayloadAnalyzerConfigurationTest.php b/tests/Analyzers/PayloadAnalyzerConfigurationTest.php
--- a/tests/Analyzers/PayloadAnalyzerConfigurationTest.php
+++ b/tests/Analyzers/PayloadAnalyzerConfigurationTest.php
@@ -20,7 +20,7 @@
/**
* Prepares the test
*/
- public function setUp () {
+ public function setUp () : void {
$filename = __DIR__ . '/../data/GitHubPayloadAnalyzer/Nasqueron.json';
$mapper = new \JsonMapper();
$this->configuration = $mapper->map(
diff --git a/tests/Analyzers/Phabricator/PhabricatorGroupMappingTest.php b/tests/Analyzers/Phabricator/PhabricatorGroupMappingTest.php
--- a/tests/Analyzers/Phabricator/PhabricatorGroupMappingTest.php
+++ b/tests/Analyzers/Phabricator/PhabricatorGroupMappingTest.php
@@ -19,7 +19,7 @@
*/
private $story;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$config = $this->getPhabricatorPayloadAnalyzerConfiguration();
diff --git a/tests/Analyzers/Phabricator/PhabricatorPayloadAnalyzerTest.php b/tests/Analyzers/Phabricator/PhabricatorPayloadAnalyzerTest.php
--- a/tests/Analyzers/Phabricator/PhabricatorPayloadAnalyzerTest.php
+++ b/tests/Analyzers/Phabricator/PhabricatorPayloadAnalyzerTest.php
@@ -19,7 +19,7 @@
*/
private $story;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->story = $this->getStory();
diff --git a/tests/Config/Reporting/FeatureReportEntryTest.php b/tests/Config/Reporting/FeatureReportEntryTest.php
--- a/tests/Config/Reporting/FeatureReportEntryTest.php
+++ b/tests/Config/Reporting/FeatureReportEntryTest.php
@@ -17,7 +17,7 @@
*/
private $disabledFeatureEntry;
- public function setUp () {
+ public function setUp () : void {
$this->enabledFeatureEntry = new FeatureReportEntry("foo", true);
$this->disabledFeatureEntry = new FeatureReportEntry("bar", false);
}
diff --git a/tests/Config/Reporting/IntegrationTest.php b/tests/Config/Reporting/IntegrationTest.php
--- a/tests/Config/Reporting/IntegrationTest.php
+++ b/tests/Config/Reporting/IntegrationTest.php
@@ -6,7 +6,7 @@
class IntegrationTest extends TestCase {
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->mockServices()
diff --git a/tests/Config/Reporting/ServiceReportEntryTest.php b/tests/Config/Reporting/ServiceReportEntryTest.php
--- a/tests/Config/Reporting/ServiceReportEntryTest.php
+++ b/tests/Config/Reporting/ServiceReportEntryTest.php
@@ -13,7 +13,7 @@
*/
private $serviceEntry;
- public function setUp () {
+ public function setUp () : void {
$service = $this->mockService();
$this->serviceEntry = new ServiceReportEntry($service);
}
diff --git a/tests/Config/Services/ServiceTest.php b/tests/Config/Services/ServiceTest.php
--- a/tests/Config/Services/ServiceTest.php
+++ b/tests/Config/Services/ServiceTest.php
@@ -17,7 +17,7 @@
*/
private $serviceWithoutInstance;
- public function setUp () {
+ public function setUp () : void {
$this->serviceWithoutInstance = new Service();
$this->serviceWithInstance = clone $this->serviceWithoutInstance;
diff --git a/tests/Config/Services/ServicesTest.php b/tests/Config/Services/ServicesTest.php
--- a/tests/Config/Services/ServicesTest.php
+++ b/tests/Config/Services/ServicesTest.php
@@ -9,7 +9,7 @@
private $services;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->services = Services::loadFromJson('credentials.json');
diff --git a/tests/Console/Commands/ConfigShowTest.php b/tests/Console/Commands/ConfigShowTest.php
--- a/tests/Console/Commands/ConfigShowTest.php
+++ b/tests/Console/Commands/ConfigShowTest.php
@@ -19,7 +19,7 @@
*/
private $servicesMock;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->servicesMock = $this->mockServices();
diff --git a/tests/Console/Commands/ConfigValidateTest.php b/tests/Console/Commands/ConfigValidateTest.php
--- a/tests/Console/Commands/ConfigValidateTest.php
+++ b/tests/Console/Commands/ConfigValidateTest.php
@@ -53,7 +53,7 @@
}
}
- public function tearDown () {
+ public function tearDown () : void {
$this->deleteTestFile();
parent::tearDown();
}
diff --git a/tests/Console/Commands/PhabricatorProjectsMapTest.php b/tests/Console/Commands/PhabricatorProjectsMapTest.php
--- a/tests/Console/Commands/PhabricatorProjectsMapTest.php
+++ b/tests/Console/Commands/PhabricatorProjectsMapTest.php
@@ -12,7 +12,7 @@
*/
protected $class = PhabricatorProjectsMap::class;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$service = $this->mockService('Phabricator');
diff --git a/tests/Console/Commands/TestCase.php b/tests/Console/Commands/TestCase.php
--- a/tests/Console/Commands/TestCase.php
+++ b/tests/Console/Commands/TestCase.php
@@ -26,7 +26,7 @@
*/
protected $tester;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$kernel = $this->app->make(Kernel::class);
diff --git a/tests/Console/KernelTest.php b/tests/Console/KernelTest.php
--- a/tests/Console/KernelTest.php
+++ b/tests/Console/KernelTest.php
@@ -30,7 +30,7 @@
*/
private $namespace;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->kernel = $this->app->make(BaseKernel::class);
diff --git a/tests/Exceptions/HandlerTest.php b/tests/Exceptions/HandlerTest.php
--- a/tests/Exceptions/HandlerTest.php
+++ b/tests/Exceptions/HandlerTest.php
@@ -22,7 +22,7 @@
*/
private $ravenClientMock;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->handler = new Handler(app());
diff --git a/tests/Http/Controllers/GitHubGateControllerTest.php b/tests/Http/Controllers/GitHubGateControllerTest.php
--- a/tests/Http/Controllers/GitHubGateControllerTest.php
+++ b/tests/Http/Controllers/GitHubGateControllerTest.php
@@ -5,7 +5,7 @@
use Nasqueron\Notifications\Tests\TestCase;
class GitHubGateControllerTest extends TestCase {
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->disableEvents();
diff --git a/tests/Http/PayloadFullTest.php b/tests/Http/PayloadFullTest.php
--- a/tests/Http/PayloadFullTest.php
+++ b/tests/Http/PayloadFullTest.php
@@ -7,7 +7,7 @@
class PayloadFullTest extends TestCase {
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->disableBroker();
diff --git a/tests/Phabricator/PhabricatorAPIExceptionTest.php b/tests/Phabricator/PhabricatorAPIExceptionTest.php
--- a/tests/Phabricator/PhabricatorAPIExceptionTest.php
+++ b/tests/Phabricator/PhabricatorAPIExceptionTest.php
@@ -12,7 +12,7 @@
*/
private $exception;
- public function setUp () {
+ public function setUp () : void {
$this->exception = new PhabricatorAPIException(
100,
"Lorem ipsum dolor"
diff --git a/tests/Phabricator/PhabricatorAPIFactoryTest.php b/tests/Phabricator/PhabricatorAPIFactoryTest.php
--- a/tests/Phabricator/PhabricatorAPIFactoryTest.php
+++ b/tests/Phabricator/PhabricatorAPIFactoryTest.php
@@ -11,7 +11,7 @@
*/
private $factory;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->factory = $this->app->make('phabricator-api');
}
diff --git a/tests/Phabricator/ProjectsMapFactoryTest.php b/tests/Phabricator/ProjectsMapFactoryTest.php
--- a/tests/Phabricator/ProjectsMapFactoryTest.php
+++ b/tests/Phabricator/ProjectsMapFactoryTest.php
@@ -11,7 +11,7 @@
*/
private $factory;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->factory = $this->app->make('phabricator-projectsmap');
diff --git a/tests/Phabricator/ProjectsMapTest.php b/tests/Phabricator/ProjectsMapTest.php
--- a/tests/Phabricator/ProjectsMapTest.php
+++ b/tests/Phabricator/ProjectsMapTest.php
@@ -15,7 +15,7 @@
*/
private $map;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
//
diff --git a/tests/Providers/ConfigTest.php b/tests/Providers/ConfigTest.php
--- a/tests/Providers/ConfigTest.php
+++ b/tests/Providers/ConfigTest.php
@@ -20,7 +20,7 @@
*/
private $namespace;
- public function setUp () {
+ public function setUp () : void {
parent::setUp();
$this->providers = Config::get('app.providers');

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 22:56 (17 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256591
Default Alt Text
D2673.diff (19 KB)

Event Timeline