From 94755775ba9fa2b5f06ed2d13a8a1dc5f8b76611 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 7 Sep 2017 15:42:12 +1200 Subject: [PATCH] Rename "code" to "src" for PSR-4 consistency --- .scrutinizer.yml | 2 +- .travis.yml | 2 +- composer.json | 2 +- phpunit.xml.dist | 2 +- {code/admin => src/Admin}/SubsiteAdmin.php | 0 {code/controller => src/Controller}/SubsiteXHRController.php | 0 .../Extension}/CMSPageAddControllerExtension.php | 0 {code/extensions => src/Extension}/ControllerSubsites.php | 0 {code/extensions => src/Extension}/ErrorPageSubsite.php | 0 {code/extensions => src/Extension}/FileSubsites.php | 0 {code/extensions => src/Extension}/GroupSubsites.php | 0 {code/extensions => src/Extension}/LeftAndMainSubsites.php | 0 {code/extensions => src/Extension}/SiteConfigSubsites.php | 0 {code/extensions => src/Extension}/SiteTreeSubsites.php | 0 {code/extensions => src/Extension}/SubsiteMenuExtension.php | 0 {code/forms => src/Forms}/GridFieldSubsiteDetailForm.php | 0 .../Forms}/GridFieldSubsiteDetailForm_ItemRequest.php | 0 {code/forms => src/Forms}/SubsitesTreeDropdownField.php | 0 {code/forms => src/Forms}/WildcardDomainField.php | 0 {code => src}/Middleware/InitStateMiddleware.php | 0 {code/model => src/Model}/Subsite.php | 0 {code/model => src/Model}/SubsiteDomain.php | 0 {code/pages => src/Pages}/SubsitesVirtualPage.php | 0 {code/reports => src/Reports}/SubsiteReportWrapper.php | 0 {code => src}/State/SubsiteState.php | 0 {code/tasks => src/Tasks}/SubsiteCopyPagesTask.php | 0 26 files changed, 4 insertions(+), 4 deletions(-) rename {code/admin => src/Admin}/SubsiteAdmin.php (100%) rename {code/controller => src/Controller}/SubsiteXHRController.php (100%) rename {code/extensions => src/Extension}/CMSPageAddControllerExtension.php (100%) rename {code/extensions => src/Extension}/ControllerSubsites.php (100%) rename {code/extensions => src/Extension}/ErrorPageSubsite.php (100%) rename {code/extensions => src/Extension}/FileSubsites.php (100%) rename {code/extensions => src/Extension}/GroupSubsites.php (100%) rename {code/extensions => src/Extension}/LeftAndMainSubsites.php (100%) rename {code/extensions => src/Extension}/SiteConfigSubsites.php (100%) rename {code/extensions => src/Extension}/SiteTreeSubsites.php (100%) rename {code/extensions => src/Extension}/SubsiteMenuExtension.php (100%) rename {code/forms => src/Forms}/GridFieldSubsiteDetailForm.php (100%) rename {code/forms => src/Forms}/GridFieldSubsiteDetailForm_ItemRequest.php (100%) rename {code/forms => src/Forms}/SubsitesTreeDropdownField.php (100%) rename {code/forms => src/Forms}/WildcardDomainField.php (100%) rename {code => src}/Middleware/InitStateMiddleware.php (100%) rename {code/model => src/Model}/Subsite.php (100%) rename {code/model => src/Model}/SubsiteDomain.php (100%) rename {code/pages => src/Pages}/SubsitesVirtualPage.php (100%) rename {code/reports => src/Reports}/SubsiteReportWrapper.php (100%) rename {code => src}/State/SubsiteState.php (100%) rename {code/tasks => src/Tasks}/SubsiteCopyPagesTask.php (100%) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 61b0c9f6..de093552 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -6,4 +6,4 @@ checks: duplication: true filter: - paths: [code/*, tests/*] + paths: [src/*, tests/*] diff --git a/.travis.yml b/.travis.yml index d4172497..20383672 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,7 +47,7 @@ before_script: script: - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi - - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=framework/phpcs.xml.dist code/ tests/ ; fi + - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=framework/phpcs.xml.dist src/ tests/ ; fi - if [[ $BEHAT_TEST ]]; then vendor/bin/behat @subsites; fi after_success: diff --git a/composer.json b/composer.json index 308385e5..659aba0a 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ }, "autoload": { "psr-4": { - "SilverStripe\\Subsites\\": "code/", + "SilverStripe\\Subsites\\": "src/", "SilverStripe\\Subsites\\Tests\\": "tests/php/" } }, diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f144246e..576e6fb2 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,7 +5,7 @@ - code/ + src/ tests/ diff --git a/code/admin/SubsiteAdmin.php b/src/Admin/SubsiteAdmin.php similarity index 100% rename from code/admin/SubsiteAdmin.php rename to src/Admin/SubsiteAdmin.php diff --git a/code/controller/SubsiteXHRController.php b/src/Controller/SubsiteXHRController.php similarity index 100% rename from code/controller/SubsiteXHRController.php rename to src/Controller/SubsiteXHRController.php diff --git a/code/extensions/CMSPageAddControllerExtension.php b/src/Extension/CMSPageAddControllerExtension.php similarity index 100% rename from code/extensions/CMSPageAddControllerExtension.php rename to src/Extension/CMSPageAddControllerExtension.php diff --git a/code/extensions/ControllerSubsites.php b/src/Extension/ControllerSubsites.php similarity index 100% rename from code/extensions/ControllerSubsites.php rename to src/Extension/ControllerSubsites.php diff --git a/code/extensions/ErrorPageSubsite.php b/src/Extension/ErrorPageSubsite.php similarity index 100% rename from code/extensions/ErrorPageSubsite.php rename to src/Extension/ErrorPageSubsite.php diff --git a/code/extensions/FileSubsites.php b/src/Extension/FileSubsites.php similarity index 100% rename from code/extensions/FileSubsites.php rename to src/Extension/FileSubsites.php diff --git a/code/extensions/GroupSubsites.php b/src/Extension/GroupSubsites.php similarity index 100% rename from code/extensions/GroupSubsites.php rename to src/Extension/GroupSubsites.php diff --git a/code/extensions/LeftAndMainSubsites.php b/src/Extension/LeftAndMainSubsites.php similarity index 100% rename from code/extensions/LeftAndMainSubsites.php rename to src/Extension/LeftAndMainSubsites.php diff --git a/code/extensions/SiteConfigSubsites.php b/src/Extension/SiteConfigSubsites.php similarity index 100% rename from code/extensions/SiteConfigSubsites.php rename to src/Extension/SiteConfigSubsites.php diff --git a/code/extensions/SiteTreeSubsites.php b/src/Extension/SiteTreeSubsites.php similarity index 100% rename from code/extensions/SiteTreeSubsites.php rename to src/Extension/SiteTreeSubsites.php diff --git a/code/extensions/SubsiteMenuExtension.php b/src/Extension/SubsiteMenuExtension.php similarity index 100% rename from code/extensions/SubsiteMenuExtension.php rename to src/Extension/SubsiteMenuExtension.php diff --git a/code/forms/GridFieldSubsiteDetailForm.php b/src/Forms/GridFieldSubsiteDetailForm.php similarity index 100% rename from code/forms/GridFieldSubsiteDetailForm.php rename to src/Forms/GridFieldSubsiteDetailForm.php diff --git a/code/forms/GridFieldSubsiteDetailForm_ItemRequest.php b/src/Forms/GridFieldSubsiteDetailForm_ItemRequest.php similarity index 100% rename from code/forms/GridFieldSubsiteDetailForm_ItemRequest.php rename to src/Forms/GridFieldSubsiteDetailForm_ItemRequest.php diff --git a/code/forms/SubsitesTreeDropdownField.php b/src/Forms/SubsitesTreeDropdownField.php similarity index 100% rename from code/forms/SubsitesTreeDropdownField.php rename to src/Forms/SubsitesTreeDropdownField.php diff --git a/code/forms/WildcardDomainField.php b/src/Forms/WildcardDomainField.php similarity index 100% rename from code/forms/WildcardDomainField.php rename to src/Forms/WildcardDomainField.php diff --git a/code/Middleware/InitStateMiddleware.php b/src/Middleware/InitStateMiddleware.php similarity index 100% rename from code/Middleware/InitStateMiddleware.php rename to src/Middleware/InitStateMiddleware.php diff --git a/code/model/Subsite.php b/src/Model/Subsite.php similarity index 100% rename from code/model/Subsite.php rename to src/Model/Subsite.php diff --git a/code/model/SubsiteDomain.php b/src/Model/SubsiteDomain.php similarity index 100% rename from code/model/SubsiteDomain.php rename to src/Model/SubsiteDomain.php diff --git a/code/pages/SubsitesVirtualPage.php b/src/Pages/SubsitesVirtualPage.php similarity index 100% rename from code/pages/SubsitesVirtualPage.php rename to src/Pages/SubsitesVirtualPage.php diff --git a/code/reports/SubsiteReportWrapper.php b/src/Reports/SubsiteReportWrapper.php similarity index 100% rename from code/reports/SubsiteReportWrapper.php rename to src/Reports/SubsiteReportWrapper.php diff --git a/code/State/SubsiteState.php b/src/State/SubsiteState.php similarity index 100% rename from code/State/SubsiteState.php rename to src/State/SubsiteState.php diff --git a/code/tasks/SubsiteCopyPagesTask.php b/src/Tasks/SubsiteCopyPagesTask.php similarity index 100% rename from code/tasks/SubsiteCopyPagesTask.php rename to src/Tasks/SubsiteCopyPagesTask.php