Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 92482c2

Browse files
author
Dominik Liebler
committed
use flyeralarm/php-code-validator to validate PHP code
1 parent 87f8eb1 commit 92482c2

File tree

5 files changed

+54
-7
lines changed

5 files changed

+54
-7
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ install:
2222

2323
script:
2424
- vendor/bin/phpunit
25+
- vendor/bin/phpcs .

Structural/Registry/Service.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?php
22

3-
43
namespace DesignPatterns\Structural\Registry;
54

5+
class Service
6+
{
67

7-
class Service {
8-
9-
}
8+
}

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
},
1515
"require-dev": {
1616
"phpunit/phpunit": "^8",
17-
"squizlabs/php_codesniffer": "^3"
17+
"squizlabs/php_codesniffer": "^3",
18+
"flyeralarm/php-code-validator": "^2.2"
1819
},
1920
"autoload": {
2021
"psr-4": {
2122
"DesignPatterns\\": ""
2223
}
2324
}
24-
}
25+
}

composer.lock

Lines changed: 39 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml.dist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<ruleset name="Project Rules">
3+
<directory>**/*.php</directory>
4+
<exclude-pattern>vendor</exclude-pattern>
5+
<arg value="sp"/>
6+
7+
<rule ref="vendor/flyeralarm/php-code-validator/ruleset.xml"/>
8+
</ruleset>

0 commit comments

Comments
 (0)