Skip to content

Commit 4bda90d

Browse files
committed
PSR12 code style
1 parent e528f07 commit 4bda90d

27 files changed

+98
-40
lines changed

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/phpunit.xml
2-
composer.lock
1+
/.idea/
32
/vendor/
4-
/build/
5-
.idea/
6-
docker-compose.yml
3+
/.phpcs-cache
4+
/composer.lock
5+
/docker-compose.yml
6+
/phpunit.xml

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"symfony/twig-bundle": "^4.4",
2222
"symfony/validator": "^4.4",
2323
"twig/twig": "^2.0",
24-
"phpspec/prophecy-phpunit": "^2.0"
24+
"phpspec/prophecy-phpunit": "^2.0",
25+
"squizlabs/php_codesniffer": "^3.5"
2526
},
2627
"suggest": {
2728
"symfony/framework-bundle": "Integrate with Symfony Framework",

phpcs.xml.dist

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
5+
6+
<arg name="basepath" value="."/>
7+
<arg name="cache" value=".phpcs-cache"/>
8+
<arg name="colors"/>
9+
<arg name="extensions" value="php"/>
10+
11+
<rule ref="PSR12"/>
12+
13+
<file>src/</file>
14+
15+
<rule ref="Generic.PHP.ForbiddenFunctions">
16+
<properties>
17+
<property name="forbiddenFunctions" type="array" value="dump=>null,var_dump=>null,die=>null"/>
18+
</properties>
19+
</rule>
20+
21+
</ruleset>

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
processIsolation="false"
99
stopOnFailure="false"
1010
colors="true"
11-
bootstrap="tests/bootstrap.php"
11+
bootstrap="vendor/autoload.php"
1212
>
1313

1414
<testsuites>

src/AbstractTranslatedEnum.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace Yokai\EnumBundle;
46

src/ConfigurableEnum.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace Yokai\EnumBundle;
46

src/ConfigurableTranslatedEnum.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace Yokai\EnumBundle;
46

src/ConstantExtractor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace Yokai\EnumBundle;
46

src/ConstantListEnum.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace Yokai\EnumBundle;
46

src/ConstantListTranslatedEnum.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace Yokai\EnumBundle;
46

0 commit comments

Comments
 (0)