mirror of
https://github.com/marcostoll/FF-Factories.git
synced 2025-01-17 06:38:17 +01:00
[FEATURE] add phpcs using PSR2
This commit is contained in:
parent
e0842f17f0
commit
ca2eea08e3
3
bin/phpcs.bat
Normal file
3
bin/phpcs.bat
Normal file
@ -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
|
@ -18,6 +18,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8",
|
||||
"squizlabs/php_codesniffer": "^3",
|
||||
"theseer/phpdox": "*"
|
||||
},
|
||||
"repositories": [
|
||||
|
@ -85,11 +85,9 @@
|
||||
</source>
|
||||
|
||||
<!-- PHP Code Sniffer findings -->
|
||||
<!--
|
||||
<source type="phpcs">
|
||||
<file name="logs/phpcs.xml" />
|
||||
<file name="../logs/phpcs/report.xml" />
|
||||
</source>
|
||||
-->
|
||||
|
||||
<!-- PHPMessDetector -->
|
||||
<!--
|
||||
|
@ -10,7 +10,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FF\Factories;
|
||||
|
||||
|
||||
/**
|
||||
* Class AbstractSingletonFactory
|
||||
*
|
||||
|
@ -60,7 +60,9 @@ class NamespaceClassLocator implements ClassLocatorInterface
|
||||
{
|
||||
foreach ($this->namespaces as $ns) {
|
||||
$fqClassname = $this->buildFqClassName($ns, $classIdentifier);
|
||||
if (!class_exists($fqClassname)) continue;
|
||||
if (!class_exists($fqClassname)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return $fqClassname;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user