Skip to content

Commit

Permalink
Apply coding standards tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
asgrim committed Feb 29, 2024
1 parent 1ce54db commit afb607a
Show file tree
Hide file tree
Showing 6 changed files with 304 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor/
/psalm.xml
/.phpunit.cache/
/.phpcs-cache
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@
"symfony/console": "^6.4"
},
"require-dev": {
"doctrine/coding-standard": "^12.0",
"phpunit/phpunit": "^10.5",
"vimeo/psalm": "^5.22"
},
"config": {
"sort-packages": true,
"preferred-install": "dist"
"preferred-install": "dist",
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
281 changes: 280 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<ruleset name="PIE Coding Standard">
<config name="php_version" value="80100"/>
<arg value="p"/>
<arg value="s"/>
<arg name="colors"/>
<arg name="cache" value=".phpcs-cache"/>

<file>bin/pie</file>
<file>src</file>
<file>test/unit</file>

<rule ref="Doctrine">
<exclude name="Generic.Files.LineLength.TooLong"/>
</rule>
</ruleset>
1 change: 1 addition & 0 deletions src/Command/DownloadCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ final class DownloadCommand extends Command
public function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('<info>to do</info>'); // @todo

return Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion test/unit/Command/DownloadCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DownloadCommandTest extends TestCase
{
public function testDownloadCommand(): void
{
$input = $this->createMock(InputInterface::class);
$input = $this->createMock(InputInterface::class);
$output = $this->createMock(OutputInterface::class);

$output->expects(self::once())
Expand Down

0 comments on commit afb607a

Please sign in to comment.