Skip to content

Commit

Permalink
Fix up composer command.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Oct 19, 2021
1 parent 64005d1 commit 47e09c0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ name: CI
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
testsuite:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -56,7 +55,7 @@ jobs:

validation:
name: Coding Standard & Static Analysis
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion bin/sniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

$options = [
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/vendor/autoload.php'
__DIR__ . '/vendor/autoload.php',
];
if (!empty($_SERVER['PWD'])) {
array_unshift($options, $_SERVER['PWD'] . '/vendor/autoload.php');
Expand All @@ -12,6 +12,7 @@
foreach ($options as $file) {
if (file_exists($file)) {
define('SNIFFER_COMPOSER_INSTALL', $file);

break;
}
}
Expand Down
3 changes: 2 additions & 1 deletion bin/tokenize.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

$options = [
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/vendor/autoload.php'
__DIR__ . '/vendor/autoload.php',
];
if (!empty($_SERVER['PWD'])) {
array_unshift($options, $_SERVER['PWD'] . '/vendor/autoload.php');
Expand All @@ -12,6 +12,7 @@
foreach ($options as $file) {
if (file_exists($file)) {
define('SNIFFER_COMPOSER_INSTALL', $file);

break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"scripts": {
"docs": "php docs/generate.php",
"docs-listing": "phpcs -e --standard=PSR2R/ruleset.xml",
"cs-check": "phpcs --standard=PSR2R/ruleset.xml -p -s --ignore=/tests/files/,*.inc,*.fixed PSR2R/",
"cs-fix": "phpcbf --standard=PSR2R/ruleset.xml -p --ignore=/tests/files/,*.inc,*.fixed PSR2R/",
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "php phpunit.phar",
"test-setup": "[ ! -f phpunit.phar ] && wget https://phar.phpunit.de/phpunit-8.5.1.phar && mv phpunit-8.5.1.phar phpunit.phar || true",
"test-setup-mac": "[ ! -f phpunit.phar ] && curl -OL https://phar.phpunit.de/phpunit-8.5.1.phar && mv phpunit-8.5.1.phar phpunit.phar || true",
Expand Down
15 changes: 15 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<ruleset name="code-sniffer">
<config name="installed_paths" value="../../fig-r/psr2r-sniffer"/>

<arg value="nps"/>

<file>PSR2R/</file>
<file>docs/</file>
<file>bin/</file>

<rule ref="PSR2R"/>

<exclude-pattern>/tests/files/,*.inc,*.fixed</exclude-pattern>

</ruleset>

0 comments on commit 47e09c0

Please sign in to comment.