diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 5e1634a..f010c17 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -116,25 +116,25 @@ We will only merge pull requests that follow the project's coding style. Please check your code with the provided PHP_CodeSniffer standard: ```bash -vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ tests/ +vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ src/ tests/ ``` Please also check the code structure using PHPMD: ```bash -vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml +vendor/bin/phpmd src/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml ``` And also please run the static code analysis: ```bash -vendor/bin/phpstan analyse -l 5 Classes/ tests/ +vendor/bin/phpstan analyse -l 5 src/ tests/ ``` You can also run all code style checks using one long line from a bash shell: ```bash -find Classes/ tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && vendor/bin/phpstan analyse -l 5 Classes/ tests/ && vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ tests/ +find src/ tests/ -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l && vendor/bin/phpstan analyse -l 5 src/ tests/ && vendor/bin/phpmd src/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ src/ tests/ ``` This will execute all tests except for the unit tests and the integration diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 13650be..b4c9b3f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -22,7 +22,7 @@ style? You can check for this using this command: - vendor/bin/phpcs --standard=PSR2 Classes/ tests/ + vendor/bin/phpcs --standard=PSR2 src/ tests/ ### Other Information diff --git a/.travis.yml b/.travis.yml index 5fbc25a..da04022 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ script: - > echo; echo "Linting all PHP files"; - find Classes/ tests/ -name ''*.php'' -print0 | xargs -0 -n 1 -P 4 php -l; + find src/ tests/ -name ''*.php'' -print0 | xargs -0 -n 1 -P 4 php -l; - > echo; @@ -76,14 +76,14 @@ script: - > echo; echo "Running the static analysis"; - vendor/bin/phpstan analyse -l 5 Classes/ tests/; + vendor/bin/phpstan analyse -l 5 src/ tests/; - > echo; echo "Running PHPMD"; - vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml; + vendor/bin/phpmd src/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml; - > echo; echo "Running PHP_CodeSniffer"; - vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ tests/; + vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ src/ tests/; diff --git a/Configuration/services.yml b/Configuration/services.yml index 6f7ca27..e95922e 100644 --- a/Configuration/services.yml +++ b/Configuration/services.yml @@ -1,6 +1,6 @@ services: PhpList\RestBundle\Controller\: - resource: '../Classes/Controller' + resource: '../src/Controller' public: true autowire: true tags: ['controller.service_arguments'] diff --git a/composer.json b/composer.json index ebd0970..7b1b997 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ }, "autoload": { "psr-4": { - "PhpList\\RestBundle\\": "Classes/" + "PhpList\\RestBundle\\": "src/" } }, "autoload-dev": { diff --git a/Classes/Controller/ListController.php b/src/Controller/ListController.php similarity index 100% rename from Classes/Controller/ListController.php rename to src/Controller/ListController.php diff --git a/Classes/Controller/SessionController.php b/src/Controller/SessionController.php similarity index 100% rename from Classes/Controller/SessionController.php rename to src/Controller/SessionController.php diff --git a/Classes/Controller/SubscriberController.php b/src/Controller/SubscriberController.php similarity index 100% rename from Classes/Controller/SubscriberController.php rename to src/Controller/SubscriberController.php diff --git a/Classes/Controller/Traits/AuthenticationTrait.php b/src/Controller/Traits/AuthenticationTrait.php similarity index 100% rename from Classes/Controller/Traits/AuthenticationTrait.php rename to src/Controller/Traits/AuthenticationTrait.php diff --git a/Classes/DependencyInjection/PhpListRestExtension.php b/src/DependencyInjection/PhpListRestExtension.php similarity index 100% rename from Classes/DependencyInjection/PhpListRestExtension.php rename to src/DependencyInjection/PhpListRestExtension.php diff --git a/Classes/PhpListRestBundle.php b/src/PhpListRestBundle.php similarity index 100% rename from Classes/PhpListRestBundle.php rename to src/PhpListRestBundle.php