From 44f289f76a44cc9d1b877e7b17c84260af1accd5 Mon Sep 17 00:00:00 2001 From: Markus Podar Date: Thu, 2 Jan 2020 11:34:21 +0100 Subject: [PATCH] [CHORE] Remove unused/stale utilities (#866) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove grumphp It reports so many violations, I don't think anyone paid attention to them in some time. Also there's code sniffer which is: - installed - works - and also run on travis explicitly Here are the current violations: ``` $ vendor/bin/grumphp run PHP Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /Users/mfischer/src/laravel-ide-helper/vendor/phpro/grumphp/src/Locator/ConfigurationFile.php on line 75 Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /Users/mfischer/src/laravel-ide-helper/vendor/phpro/grumphp/src/Locator/ConfigurationFile.php on line 75 GrumPHP is sniffing your code!✘ Running task 2/2: Phpunit... ✔ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▄███▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ █▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▐█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▀█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▀▀▓▓▓▓▓▓▓▓▓▓▓▓█▀▀▀▀▀▀▀▀▀▀▀▀▀▀████████████▄ ▄███████ ██████████ ███████▀ ▀▀▀▀▀▄ ▄▀▀▀▀▀ █████ ▀ ▐████ ▐██ ▐██ ████▌ ████▌ ███ ▌██▌ ▄▄ ▄▄ ▐███ ███ ▄▄▄▄▄▄▄▄▄▄▄▄ ▐███ ██▄ ▐███████████████████████████ █▀███████████▀ ▀▀███████████ ██████████▄███████▄███████████ ▐█████████████████████████████ █████████████████████████████ ██ █████████████████████▐██▀ ▀ ▐███████████████████▌ ▐▀ ████▀████████▀▐███ ▀█▌ ▐█████ ██▌ ██▀ ▐▀ ██████████████████████████████████ █░░░░░░▀█▀░░░░░░▀█░░░░░░▀█▀░░░░░▀█ █░░▐█▌░░█░░░██░░░█░░██░░░█░░░██░░█ █░░▐█▌░░█░░░██░░░█░░██░░░█░░░██░░█ █░░▐█▌░░█░░░██░░░█░░░░░░▄█░░▄▄▄▄▄█ █░░▐█▌░░█░░░██░░░█░░░░████░░░░░░░█ █░░░█░░░█▄░░░░░░▄█░░░░████▄░░░░░▄█ ██████████████████████████████████ FILE: ...Users/mfischer/src/laravel-ide-helper/resources/views/helper.php ---------------------------------------------------------------------- FOUND 46 ERRORS AND 3 WARNINGS AFFECTING 24 LINES ---------------------------------------------------------------------- 23 | ERROR | [x] Expected 1 space(s) after FOREACH keyword; 0 | | found 23 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 24 | ERROR | [x] Line indented incorrectly; expected at least 4 | | spaces, found 0 24 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 24 | ERROR | [x] Newline required after opening brace 24 | ERROR | [x] Closing brace must be on a line by itself 24 | ERROR | [x] Each PHP statement must be on a line by itself 26 | ERROR | [x] Line indented incorrectly; expected at least 4 | | spaces, found 0 26 | ERROR | [x] Expected 1 space(s) after FOREACH keyword; 0 | | found 26 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 26 | ERROR | [x] Blank line found at start of control structure 28 | ERROR | [x] Line indented incorrectly; expected at least 8 | | spaces, found 4 29 | ERROR | [x] Line indented incorrectly; expected at least 8 | | spaces, found 4 30 | ERROR | [x] Expected 1 space(s) after FOREACH keyword; 0 | | found 30 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 30 | ERROR | [x] Blank line found at start of control structure 32 | ERROR | [x] Line indented incorrectly; expected at least 12 | | spaces, found 8 34 | ERROR | [x] Expected 1 space(s) after IF keyword; 0 found 34 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 34 | ERROR | [x] Blank line found at start of control structure 37 | ERROR | [x] Closing brace indented incorrectly; expected 9 | | spaces, found 12 39 | ERROR | [x] Expected 1 space(s) after IF keyword; 0 found 39 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 51 | ERROR | [x] Expected 1 space(s) after FOREACH keyword; 0 | | found 51 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 53 | ERROR | [x] Line indented incorrectly; expected at least 4 | | spaces, found 0 53 | ERROR | [x] Expected 1 space(s) after FOREACH keyword; 0 | | found 53 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 53 | ERROR | [x] Blank line found at start of control structure 55 | ERROR | [x] Line indented incorrectly; expected at least 8 | | spaces, found 4 55 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 55 | WARNING | [ ] Line exceeds 120 characters; contains 180 | | characters 56 | ERROR | [x] Expected 1 space(s) after FOREACH keyword; 0 | | found 56 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 59 | ERROR | [x] Expected 1 space(s) after IF keyword; 0 found 59 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 59 | ERROR | [x] Blank line found at start of control structure 62 | ERROR | [x] Closing brace indented incorrectly; expected 13 | | spaces, found 16 64 | ERROR | [x] Expected 1 space(s) after IF keyword; 0 found 64 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 70 | ERROR | [x] Closing brace indented incorrectly; expected 4 | | spaces, found 0 76 | ERROR | [x] Expected 1 space(s) after IF keyword; 0 found 76 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 78 | ERROR | [x] Line indented incorrectly; expected at least 4 | | spaces, found 0 82 | ERROR | [x] Expected 1 space(s) after IF keyword; 0 found 82 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 109 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 112 | WARNING | [ ] Line exceeds 120 characters; contains 141 | | characters 113 | WARNING | [ ] Line exceeds 120 characters; contains 139 | | characters ---------------------------------------------------------------------- PHPCBF CAN FIX THE 46 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- FILE: /Users/mfischer/src/laravel-ide-helper/resources/views/meta.php ---------------------------------------------------------------------- FOUND 10 ERRORS AFFECTING 6 LINES ---------------------------------------------------------------------- 14 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 17 | ERROR | [x] Line indented incorrectly; expected at least 4 | | spaces, found 0 17 | ERROR | [x] Expected 1 space(s) after FOREACH keyword; 0 found 17 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 23 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 24 | ERROR | [x] Spaces must be used to indent lines; tabs are not | | allowed 26 | ERROR | [x] Line indented incorrectly; expected at least 4 | | spaces, found 0 26 | ERROR | [x] Expected 1 space(s) after FOREACH keyword; 0 found 26 | ERROR | [x] Expected 1 space(s) after closing parenthesis; | | found 0 29 | ERROR | [x] Spaces must be used to indent lines; tabs are not | | allowed ---------------------------------------------------------------------- PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- Time: 260ms; Memory: 12MB ``` * Remove scrutinizer/ocular Looks unused, also not used on travis * Remove StyleCI Isn't enabled * Revert "Remove grumphp" This reverts commit a69696f0 * grumphp: add whitelist to ignore the resources/ folder * grumphp: per .editorconf the indentation is 4 spaces, not 2 --- .gitattributes | 3 +-- .scrutinizer.yml | 23 ----------------------- .styleci.yml | 1 - composer.json | 1 - grumphp.yml | 7 +++++-- readme.md | 4 ---- 6 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 .scrutinizer.yml delete mode 100644 .styleci.yml diff --git a/.gitattributes b/.gitattributes index 01c98c6..4e79598 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,5 +6,4 @@ /.gitignore export-ignore /.travis.yml export-ignore /phpunit.xml.dist export-ignore -/.scrutinizer.yml export-ignore -/tests export-ignore \ No newline at end of file +/tests export-ignore diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index e0425f1..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,23 +0,0 @@ -filter: - excluded_paths: [tests/*] - -checks: - php: - remove_extra_empty_lines: true - remove_php_closing_tag: true - remove_trailing_whitespace: true - fix_use_statements: - remove_unused: true - preserve_multiple: false - preserve_blanklines: true - order_alphabetically: true - fix_php_opening_tag: true - fix_linefeed: true - fix_line_ending: true - fix_identation_4spaces: true - fix_doc_comments: true - -tools: - external_code_coverage: - timeout: 600 - runs: 3 \ No newline at end of file diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index b46b01d..0000000 --- a/.styleci.yml +++ /dev/null @@ -1 +0,0 @@ -preset: psr2 \ No newline at end of file diff --git a/composer.json b/composer.json index 7c44add..59dc964 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "illuminate/config": "^5.5|^6", "illuminate/view": "^5.5|^6", "phpro/grumphp": "^0.14", - "scrutinizer/ocular": "~1.1", "squizlabs/php_codesniffer": "^3", "orchestra/testbench": "^4.4" }, diff --git a/grumphp.yml b/grumphp.yml index 4b767a0..b73d14f 100644 --- a/grumphp.yml +++ b/grumphp.yml @@ -11,5 +11,8 @@ parameters: standard: PSR2 warning_severity: ~ ignore_patterns: - - tests/ - triggered_by: [php] \ No newline at end of file + - tests/ + triggered_by: [php] + whitelist_patterns: + - /^src\/.*/ + - /^config\/.*/ diff --git a/readme.md b/readme.md index 465fdb0..704d10c 100644 --- a/readme.md +++ b/readme.md @@ -261,14 +261,10 @@ The Laravel IDE Helper Generator is open-sourced software licensed under the [MI [ico-version]: https://img.shields.io/packagist/v/barryvdh/laravel-ide-helper.svg?style=flat-square [ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square [ico-travis]: https://img.shields.io/travis/barryvdh/laravel-ide-helper/master.svg?style=flat-square -[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/barryvdh/laravel-ide-helper.svg?style=flat-square -[ico-code-quality]: https://img.shields.io/scrutinizer/g/barryvdh/laravel-ide-helper.svg?style=flat-square [ico-downloads]: https://img.shields.io/packagist/dt/barryvdh/laravel-ide-helper.svg?style=flat-square [link-packagist]: https://packagist.org/packages/barryvdh/laravel-ide-helper [link-travis]: https://travis-ci.org/barryvdh/laravel-ide-helper -[link-scrutinizer]: https://scrutinizer-ci.com/g/barryvdh/laravel-ide-helper/code-structure -[link-code-quality]: https://scrutinizer-ci.com/g/barryvdh/laravel-ide-helper [link-downloads]: https://packagist.org/packages/barryvdh/laravel-ide-helper [link-author]: https://github.com/barryvdh [link-contributors]: ../../contributors