Skip to content

Commit aa1e684

Browse files
Andreas Frömericanhazstring
authored andcommitted
Update csfixer to psr12
1 parent 065fd82 commit aa1e684

File tree

5 files changed

+30
-13
lines changed

5 files changed

+30
-13
lines changed

composer.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@
99
"require-dev": {
1010
"phpunit/phpunit": "^9.0",
1111
"squizlabs/php_codesniffer": "^3.5",
12-
"codeclimate/php-test-reporter": "dev-master"
12+
"codeclimate/php-test-reporter": "dev-master",
13+
"slevomat/coding-standard": "^6.1"
1314
},
1415
"autoload": {
1516
"psr-4": {
16-
"SystemCtl\\": [
17-
"src/"
18-
]
17+
"icanhazstring\\SystemCtl\\": "src/"
1918
}
2019
},
2120
"autoload-dev": {
2221
"psr-4": {
23-
"SystemCtl\\Test\\": [
24-
"test/"
25-
]
22+
"icanhazstring\\SystemCtl\\Test\\": "test/"
2623
}
2724
},
2825
"license": "MIT",
@@ -33,7 +30,7 @@
3330
}
3431
],
3532
"scripts": {
36-
"test": "vendor/bin/phpunit tests/",
37-
"cs": "vendor/bin/phpcs --standard=PSR2 src/ && vendor/bin/phpcs --standard=PSR2 tests/"
33+
"test": "vendor/bin/phpunit",
34+
"cs": "vendor/bin/phpcs"
3835
}
3936
}

phpcs.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<ruleset>
3+
<!-- Add slevomat/coding-standard to installed_paths so we can use a single sniff -->
4+
<config name="installed_paths" value="../../slevomat/coding-standard"/>
5+
6+
<!-- display progress -->
7+
<arg value="p"/>
8+
<arg name="colors"/>
9+
10+
<!-- inherit rules from: -->
11+
<rule ref="PSR12"/>
12+
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
13+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
14+
<properties>
15+
<property name="ignoreBlankLines" value="false"/>
16+
</properties>
17+
</rule>
18+
19+
<!-- Paths to check -->
20+
<file>src</file>
21+
<file>test</file>
22+
</ruleset>

src/Command/CommandInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace SystemCtl\Command;
54

65
use SystemCtl\Exception\CommandFailedException;

src/Exception/UnitTypeNotSupportedException.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace SystemCtl\Exception;
54

65
/**

src/SystemCtl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static function unitFromSuffix(string $unitSuffix, string $unitName): Uni
8181
throw new UnitTypeNotSupportedException('Unit type ' . $unitSuffix . ' not supported');
8282
}
8383

84-
$commandDispatcher = (new SymfonyCommandDispatcher)
84+
$commandDispatcher = (new SymfonyCommandDispatcher())
8585
->setTimeout(self::$timeout)
8686
->setBinary(self::$binary);
8787

@@ -242,7 +242,7 @@ public function daemonReload(): bool
242242
public function getCommandDispatcher(): CommandDispatcherInterface
243243
{
244244
if ($this->commandDispatcher === null) {
245-
$this->commandDispatcher = (new SymfonyCommandDispatcher)
245+
$this->commandDispatcher = (new SymfonyCommandDispatcher())
246246
->setTimeout(self::$timeout)
247247
->setBinary(self::$binary);
248248
}

0 commit comments

Comments
 (0)