Skip to content

Commit

Permalink
Merge pull request #12 from SimoTod/misc/phpcs
Browse files Browse the repository at this point in the history
Enforce PSR2
  • Loading branch information
SimoTod authored Mar 9, 2020
2 parents 362e65a + aeb658a commit 44557fc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"illuminate/view": "^6.0|^7.0",
"phpstan/phpstan": "^0.12.11",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^8.0|^9.0"
"phpunit/phpunit": "^8.0|^9.0",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload-dev": {
"psr-4": {
Expand All @@ -47,9 +48,11 @@
"preferred-install": "dist"
},
"scripts": {
"test:styles": "phpcs",
"test:types": "phpstan analyse --ansi",
"test:unit": "phpunit --colors=always",
"test": [
"@test:styles",
"@test:types",
"@test:unit"
]
Expand Down
9 changes: 9 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<file>./src</file>
<file>./tests</file>

<arg name="colors"/>
<arg value="sp"/>
<rule ref="PSR2"/>
</ruleset>
4 changes: 3 additions & 1 deletion tests/FakeView.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public function getName(): string

public function render(callable $callback = null): string
{
return (string) file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'fixtures' . DIRECTORY_SEPARATOR . $this->name . '.html');
return (string) file_get_contents(
__DIR__ . DIRECTORY_SEPARATOR . 'fixtures' . DIRECTORY_SEPARATOR . $this->name . '.html'
);
}
}

0 comments on commit 44557fc

Please sign in to comment.