Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
516 changed files
with
27,180 additions
and
12,678 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,46 @@ | ||
engines: | ||
version: "2" | ||
checks: | ||
argument-count: | ||
config: | ||
threshold: 4 | ||
complex-logic: | ||
config: | ||
threshold: 4 | ||
file-lines: | ||
config: | ||
threshold: 250 | ||
method-complexity: | ||
config: | ||
threshold: 5 | ||
method-count: | ||
config: | ||
threshold: 20 | ||
method-lines: | ||
config: | ||
threshold: 25 | ||
nested-control-flow: | ||
config: | ||
threshold: 4 | ||
return-statements: | ||
config: | ||
threshold: 4 | ||
exclude_patterns: | ||
- 'docs/' | ||
- 'tests/' | ||
- 'vendor/' | ||
plugins: | ||
duplication: | ||
enabled: true | ||
config: | ||
languages: | ||
php: | ||
mass_threshold: 42 | ||
checks: | ||
Similar code: | ||
enabled: false | ||
fixme: | ||
enabled: true | ||
phpcodesniffer: | ||
enabled: true | ||
phpmd: | ||
enabled: true | ||
fixme: | ||
enabled: true | ||
ratings: | ||
paths: | ||
- "**.php" | ||
exclude_paths: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
*.phar | ||
.phpcs-cache | ||
.php_cs.cache | ||
.php-version | ||
.phpunit.result.cache | ||
composer.*.lock | ||
composer.lock | ||
phpunit.xml | ||
phpunit.*.xml | ||
vendor/ | ||
composer.lock* | ||
doctrine2-spatial.iml | ||
.idea* | ||
.idea/* | ||
/nbproject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->exclude('var') | ||
->exclude('vendor') | ||
; | ||
|
||
$header = <<<EOF | ||
Copyright (C) 2020 Alexandre Tranchant | ||
Copyright (C) 2015 Derek J. Lambert | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
EOF; | ||
|
||
return PhpCsFixer\Config::create() | ||
// ->setCacheFile(__DIR__.'/.php_cs.cache') | ||
->setRules([ | ||
'@DoctrineAnnotation' => true, | ||
'@PhpCsFixer' => true, | ||
'@Symfony' => true, | ||
'@PHPUnit75Migration:risky' => true, | ||
'@PHP70Migration' => true, | ||
'@PHP71Migration' => true, | ||
'@PHP73Migration' => true, | ||
// 'strict_param' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'dir_constant' => true, | ||
'ereg_to_preg' => true, | ||
'header_comment' => [ | ||
'comment_type' => 'PHPDoc', | ||
'header' => $header, | ||
'location' => 'after_open', | ||
'separate' => 'bottom' | ||
], | ||
// 'date_time_immutable' => true, | ||
// 'declare_strict_types' => true, | ||
'is_null' => true, | ||
'mb_str_functions' => true, | ||
'modernize_types_casting' => true, | ||
'no_unneeded_final_method' => true, | ||
// 'no_alias_functions' =>true, | ||
'ordered_interfaces' => [ | ||
'direction' => 'ascend', | ||
'order' => 'alpha', | ||
], | ||
'ordered_class_elements' => [ | ||
'order' => [ | ||
'use_trait', | ||
'constant_public', 'constant_protected', 'constant_private', 'constant', | ||
'property_public_static', 'property_protected_static', 'property_private_static', 'property_static', | ||
'property_public', 'property_protected', 'property_private', 'property', | ||
'construct', 'destruct', | ||
'phpunit', | ||
'method_public_static', 'method_protected_static', 'method_private_static', 'method_static', | ||
'method_public', 'method_protected', 'method_private', 'method', 'magic' | ||
], | ||
'sortAlgorithm' => 'alpha' | ||
], | ||
'php_unit_test_case_static_method_calls' => true, | ||
'single_line_throw' => false | ||
]) | ||
->setFinder($finder) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
formats: all | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
#python: | ||
# version: 3.7 | ||
# install: | ||
# - requirements: docs/requirements.txt |
Oops, something went wrong.