From ca2eea08e396dc5aca6870576469f0b74ee12de7 Mon Sep 17 00:00:00 2001 From: Marco Stoll Date: Wed, 26 Jun 2019 11:45:44 +0200 Subject: [PATCH] [FEATURE] add phpcs using PSR2 --- bin/phpcs.bat | 3 +++ composer.json | 1 + phpdox.xml | 4 +--- src/AbstractFactory.php | 2 +- src/AbstractSingletonFactory.php | 3 +-- src/ClassLocators/BaseNamespaceClassLocator.php | 2 +- src/ClassLocators/ClassIdentifierAwareInterface.php | 2 +- src/ClassLocators/ClassLocatorInterface.php | 2 +- src/ClassLocators/NamespaceClassLocator.php | 6 ++++-- src/ClassLocators/NamespacePrefixedClassLocator.php | 2 +- src/Exceptions/ClassNotFoundException.php | 2 +- src/Exceptions/InstantiationException.php | 2 +- tests/AbstractFactoryTest.php | 2 +- tests/AbstractSingletonFactoryTest.php | 2 +- tests/ClassLocators/BaseNamespaceClassLocatorTest.php | 2 +- tests/ClassLocators/NamespaceClassLocatorTest.php | 2 +- tests/ClassLocators/NamespacePrefixedClassLocatorTest.php | 2 +- 17 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 bin/phpcs.bat diff --git a/bin/phpcs.bat b/bin/phpcs.bat new file mode 100644 index 0000000..dc91dbd --- /dev/null +++ b/bin/phpcs.bat @@ -0,0 +1,3 @@ +@ECHO OFF +SET PROJECT_HOME=C:\dev\ffe\fastforward\Factories +vendor\bin\phpcs --report=xml --report-file="%PROJECT_HOME%\logs\phpcs\report.xml" --standard=PSR2 %PROJECT_HOME%\src %PROJECT_HOME%\tests -p \ No newline at end of file diff --git a/composer.json b/composer.json index 2f54bc0..8e5fb28 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ }, "require-dev": { "phpunit/phpunit": "^8", + "squizlabs/php_codesniffer": "^3", "theseer/phpdox": "*" }, "repositories": [ diff --git a/phpdox.xml b/phpdox.xml index e90d769..157f08f 100644 --- a/phpdox.xml +++ b/phpdox.xml @@ -85,11 +85,9 @@ -