Skip to content

Commit

Permalink
all autofixed
Browse files Browse the repository at this point in the history
  • Loading branch information
pablorsk committed Sep 14, 2018
1 parent 47702c3 commit 5255d4a
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 1,076 deletions.
2 changes: 1 addition & 1 deletion autofix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sh vendor/reyesoft/ci/tools/find-double-spaces.sh src/
sh vendor/reyesoft/ci/tools/find-double-spaces.sh tests/

echo "php-cs-fixer..." &&
./vendor/bin/php-cs-fixer fix --config=resources/ci/.php-cs-fixer.dist
./vendor/bin/php-cs-fixer fix --config=resources/rules/php-cs-fixer.php
echo

git status -s
Expand Down
28 changes: 8 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
},
"require-dev": {
"orchestra/testbench": "3.4.*|3.5.*|3.6.*",
"illuminate/support": ">=5.0,<5.8",
"illuminate/validation": ">=5.0,<5.8",
"reyesoft/ci": "0.1.3",
"reyesoft/ci": "1.0.5",
"squizlabs/php_codesniffer": "3.3.0",
"phpunit/phpunit": "7.2.6",
"codedungeon/phpunit-result-printer": "0.19.10",
Expand All @@ -52,27 +50,17 @@
},
"scripts": {
"autofix": "sh autofix.sh",
"ci": [
"@ci-php-cpd",
"@ci-double-spaces",
"@phpstan",
"@ci-php-csniffer",
"@ci-php-cs-fixer",
"@ci-php-md"
"ci-double-spaces": [
"sh vendor/reyesoft/ci/tools/find-double-spaces.sh app",
"sh vendor/reyesoft/ci/tools/find-double-spaces.sh tests"
],
"ci-php-cpd": "sh resources/ci/php-cpd.sh",
"ci-double-spaces": "sh vendor/reyesoft/ci/tools/find-double-spaces.sh src",
"ci-php-csniffer": "sh resources/ci/php-csniffer.sh",
"ci-php-csniffer-fix": "sh resources/ci/php-csniffer-fix.sh",
"ci-php-cs-fixer": "sh resources/ci/php-cs-fixer.sh",
"ci-php-md": "sh resources/ci/php-md.sh",
"ci-php-cs-fixer": "sh vendor/reyesoft/ci/php/scripts/php-cs-fixer.sh",
"phpstan": [
"@phpstan-src",
"@phpstan-tests"
],
"phpstan-src": "./vendor/bin/phpstan analyse -l 7 -c resources/ci/.phpstan.src.neon src",
"phpstan-src-TODO": "./vendor/bin/phpstan analyse -l 7 -c resources/ci/.phpstan.src.neon src tests/dummy",
"phpstan-tests": "./vendor/bin/phpstan analyse -l 7 -c resources/ci/.phpstan.tests.neon tests",
"phpstan-src": "./vendor/bin/phpstan analyse -l 7 -c resources/rules/phpstan.src.neon app ./bootstrap/*.php config",
"phpstan-tests": "./vendor/bin/phpstan analyse -l 7 -c resources/rules/phpstan.tests.neon tests",

"ide-helper": [
"# php artisan ide-helper:meta --filename=bootstrap/cache/.phpstorm.meta.php",
Expand All @@ -86,7 +74,7 @@

"coverage": [
"ulimit -Sn 50000 && phpdbg -d memory_limit=-1 -qrr ./vendor/bin/phpunit",
"php vendor/reyesoft/ci/tools/coverage-checker.php ./bootstrap/cache/clover.xml 100"
"php vendor/reyesoft/ci/tools/coverage-checker.php ./bootstrap/cache/clover.xml 97"
],
"test": [
"./runtests"
Expand Down
937 changes: 0 additions & 937 deletions resources/.phpstorm.meta.php

This file was deleted.

2 changes: 2 additions & 0 deletions resources/.tmp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
96 changes: 0 additions & 96 deletions resources/ci/.phpmd.xml

This file was deleted.

7 changes: 0 additions & 7 deletions resources/ci/php-md.sh

This file was deleted.

11 changes: 0 additions & 11 deletions resources/ci/tools/php-cs-fixer.sh

This file was deleted.

28 changes: 28 additions & 0 deletions resources/rules/php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
$project_name = '';
$config = require __DIR__.'/../../vendor/reyesoft/ci/php/rules/php-cs-fixer.dist.php';

// rules override
$rules = array_merge(
$config->getRules(),
[
'header_comment' => [
'header' =>
"Copyright (C) 2018-2018 Pablo Reyes <[email protected]>.\n".
"\n".
"This file is part of ArgentinaDataValidator. ArgentinaDataValidator \n".
"distributed under MIT Licence.",
'commentType' => 'PHPDoc',
'location' => 'after_open',
'separate' => 'bottom'
],
]
);

return $config
->setRules($rules)
->setFinder(
PhpCsFixer\Finder::create()
->in('./src')
->in('./tests')
);
10 changes: 10 additions & 0 deletions resources/rules/phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<ruleset name="Reyesoft PHPMD rule set"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">

<rule ref="../../../../../reyesoft/ci/php/rules/phpmd.dist.xml" />

</ruleset>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

declare(strict_types=1);

$helper_meta_file = './resources/_ide_helper_meta.php';
$helper_meta_file = './bootstrap/cache/_ide_helper_meta.php';
if(!file_exists($helper_meta_file)) {
exec('composer ide-helper');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
includes:
- ../../vendor/phpstan/phpstan-strict-rules/rules.neon
- ../../vendor/weebly/phpstan-laravel/extension.neon

parameters:
bootstrap: %rootDir%/../../../resources/ci/tools/phpstan/bootstrap.php

ignoreErrors:
# Laravel
# - '#Call to an undefined static method Illuminate\\Support\\Facades\\Route::\S.+().#'
# JsonApi Library
# - '#.+ErrorMutatorException::__construct\(\) does not.+#'
- '#Call to an undefined static method Illuminate\\Support\\Facades\\Route::\S.+().#'
File renamed without changes.

0 comments on commit 5255d4a

Please sign in to comment.