Skip to content

Commit

Permalink
fix: Fixed monorepo phpcs config standard
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Jun 27, 2023
1 parent 5d7283b commit b3a1ac0
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 40 deletions.
29 changes: 29 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Roadiz">
<description>The coding standard for Roadiz monorepo.</description>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<rule ref="PSR12">
<exclude name="Generic.Files.LineLength"/>
</rule>

<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/bower_components/*</exclude-pattern>

<file>lib/DocGenerator/src</file>
<file>lib/Documents/src</file>
<file>lib/DtsGenerator/src</file>
<file>lib/EntityGenerator/src</file>
<file>lib/Jwt/src</file>
<file>lib/Markdown/src</file>
<file>lib/Models/src</file>
<file>lib/OpenId/src</file>
<file>lib/Random/src</file>
<file>lib/RoadizCompatBundle/src</file>
<file>lib/RoadizCoreBundle/src</file>
<file>lib/RoadizFontBundle/src</file>
<file>lib/RoadizRozierBundle/src</file>
<file>lib/RoadizUserBundle/src</file>
<file>lib/RoadizTwoFactorBundle/src</file>
<file>lib/Rozier/src</file>
</ruleset>
21 changes: 4 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,7 @@ test:
vendor/bin/atoum -d ./lib/Documents/tests
vendor/bin/atoum -f ./lib/EntityGenerator/tests/units/*
vendor/bin/phpunit -v lib/Models/tests
#php -d "memory_limit=-1" vendor/bin/phpcs --report=full --report-file=./report.txt -p ./src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/DocGenerator/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Documents/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/DtsGenerator/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/EntityGenerator/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Jwt/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Markdown/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Models/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/OpenId/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Random/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizCompatBundle/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizCoreBundle/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizFontBundle/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizRozierBundle/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizUserBundle/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/RoadizTwoFactorBundle/src
php -d "memory_limit=-1" vendor/bin/phpcbf -p ./lib/Rozier/src
php -d "memory_limit=-1" vendor/bin/phpcs -p
make phpstan
php -d "memory_limit=-1" bin/console lint:twig ./lib/Rozier/src/Resources/views
php -d "memory_limit=-1" bin/console lint:twig ./lib/Documents/src/Resources/views
Expand All @@ -33,6 +17,9 @@ test:
php -d "memory_limit=-1" bin/console lint:twig ./lib/RoadizCoreBundle/templates
php -d "memory_limit=-1" bin/console lint:twig ./lib/RoadizTwoFactorBundle/templates

fix:
php -d "memory_limit=-1" vendor/bin/phpcbf -p

requirements:
vendor/bin/requirements-checker

Expand Down
2 changes: 1 addition & 1 deletion lib/RoadizCoreBundle/src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$fixturesRoot = dirname(__DIR__) . '/../config';
$fixtureFile = file_get_contents($fixturesRoot . "/fixtures.yaml");

if (false === $fixtureFile) {
if (false === $fixtureFile) {
$io->error('No fixtures.yaml file found in ' . $fixturesRoot);
return 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,4 @@ protected function execute(InputInterface $input, OutputInterface $output): int

return 0;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function indexAction(Request $request, ?int $folderId = null): Response
$this->assignation['mimeType'] = trim($type);
}

$embedPlatform = $request->query->get('embedPlatform', null);
$embedPlatform = $request->query->get('embedPlatform', null);
if (\is_string($embedPlatform) && trim($embedPlatform) !== '') {
$prefilters['embedPlatform'] = trim($embedPlatform);
$this->assignation['embedPlatform'] = trim($embedPlatform);
Expand Down
20 changes: 0 additions & 20 deletions phpcs.xml.dist

This file was deleted.

0 comments on commit b3a1ac0

Please sign in to comment.