From 2e7e5e0190fa8f659fa2ed7427f742d43eb35087 Mon Sep 17 00:00:00 2001 From: Sam Wilson Date: Tue, 30 Jan 2018 10:21:53 +0800 Subject: [PATCH] Move classes to includes/ and rename some to match class names For conformance to coding standards. This removes an exclusion from the phpcs config. Change-Id: I1481a3e7e68a81daf310ea3c7bf9dc48cdaf140b --- .phpcs.xml | 1 - extension.json | 16 ++++++++-------- ApiFlowThank.php => includes/ApiFlowThank.php | 0 ApiRevThank.php => includes/ApiRevThank.php | 0 ApiThank.php => includes/ApiThank.php | 0 .../EchoFlowThanksPresentationModel.php | 0 .../EchoThanksPresentationModel.php | 0 SpecialThanks.php => includes/SpecialThanks.php | 0 Thanks.hooks.php => includes/ThanksHooks.php | 2 +- .../ThanksLogFormatter.php | 0 tests/phpunit/ApiFlowThankIntegrationTest.php | 2 +- 11 files changed, 10 insertions(+), 11 deletions(-) rename ApiFlowThank.php => includes/ApiFlowThank.php (100%) rename ApiRevThank.php => includes/ApiRevThank.php (100%) rename ApiThank.php => includes/ApiThank.php (100%) rename FlowThanksPresentationModel.php => includes/EchoFlowThanksPresentationModel.php (100%) rename ThanksPresentationModel.php => includes/EchoThanksPresentationModel.php (100%) rename SpecialThanks.php => includes/SpecialThanks.php (100%) rename Thanks.hooks.php => includes/ThanksHooks.php (99%) rename ThanksLogFormatter.php => includes/ThanksLogFormatter.php (100%) diff --git a/.phpcs.xml b/.phpcs.xml index 3f9d0cb6..21b2bef8 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -2,7 +2,6 @@ - diff --git a/extension.json b/extension.json index 89dbae38..d8373936 100644 --- a/extension.json +++ b/extension.json @@ -46,14 +46,14 @@ "ThanksAlias": "Thanks.alias.php" }, "AutoloadClasses": { - "ThanksHooks": "Thanks.hooks.php", - "EchoThanksPresentationModel": "ThanksPresentationModel.php", - "EchoFlowThanksPresentationModel": "FlowThanksPresentationModel.php", - "ApiThank": "ApiThank.php", - "ApiRevThank": "ApiRevThank.php", - "ApiFlowThank": "ApiFlowThank.php", - "ThanksLogFormatter": "ThanksLogFormatter.php", - "SpecialThanks": "SpecialThanks.php" + "ThanksHooks": "includes/ThanksHooks.php", + "EchoThanksPresentationModel": "includes/EchoThanksPresentationModel.php", + "EchoFlowThanksPresentationModel": "includes/EchoFlowThanksPresentationModel.php", + "ApiThank": "includes/ApiThank.php", + "ApiRevThank": "includes/ApiRevThank.php", + "ApiFlowThank": "includes/ApiFlowThank.php", + "ThanksLogFormatter": "includes/ThanksLogFormatter.php", + "SpecialThanks": "includes/SpecialThanks.php" }, "ResourceModules": { "ext.thanks": { diff --git a/ApiFlowThank.php b/includes/ApiFlowThank.php similarity index 100% rename from ApiFlowThank.php rename to includes/ApiFlowThank.php diff --git a/ApiRevThank.php b/includes/ApiRevThank.php similarity index 100% rename from ApiRevThank.php rename to includes/ApiRevThank.php diff --git a/ApiThank.php b/includes/ApiThank.php similarity index 100% rename from ApiThank.php rename to includes/ApiThank.php diff --git a/FlowThanksPresentationModel.php b/includes/EchoFlowThanksPresentationModel.php similarity index 100% rename from FlowThanksPresentationModel.php rename to includes/EchoFlowThanksPresentationModel.php diff --git a/ThanksPresentationModel.php b/includes/EchoThanksPresentationModel.php similarity index 100% rename from ThanksPresentationModel.php rename to includes/EchoThanksPresentationModel.php diff --git a/SpecialThanks.php b/includes/SpecialThanks.php similarity index 100% rename from SpecialThanks.php rename to includes/SpecialThanks.php diff --git a/Thanks.hooks.php b/includes/ThanksHooks.php similarity index 99% rename from Thanks.hooks.php rename to includes/ThanksHooks.php index 376018a2..9c83bef6 100644 --- a/Thanks.hooks.php +++ b/includes/ThanksHooks.php @@ -21,7 +21,7 @@ class ThanksHooks { ) { if ( class_exists( 'SpecialMobileDiff' ) ) { $testModules['qunit']['tests.ext.thanks.mobilediff'] = [ - 'localBasePath' => __DIR__, + 'localBasePath' => dirname( __DIR__ ), 'remoteExtPath' => 'Thanks', 'dependencies' => [ 'ext.thanks.mobilediff' ], 'scripts' => [ diff --git a/ThanksLogFormatter.php b/includes/ThanksLogFormatter.php similarity index 100% rename from ThanksLogFormatter.php rename to includes/ThanksLogFormatter.php diff --git a/tests/phpunit/ApiFlowThankIntegrationTest.php b/tests/phpunit/ApiFlowThankIntegrationTest.php index 60a79af7..cc533eed 100644 --- a/tests/phpunit/ApiFlowThankIntegrationTest.php +++ b/tests/phpunit/ApiFlowThankIntegrationTest.php @@ -17,7 +17,7 @@ use Flow\Model\UUID; * * @author Benjamin Chen */ -class ApiFlowThankTest extends ApiTestCase { +class ApiFlowThankIntegrationTest extends ApiTestCase { /** @var PostRevision */ public $topic;