Skip to content

Commit

Permalink
Merge 05e73d0 into 58ea5fa
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre-T committed Jun 4, 2020
2 parents 58ea5fa + 05e73d0 commit a6d7a72
Show file tree
Hide file tree
Showing 516 changed files with 27,180 additions and 12,678 deletions.
49 changes: 42 additions & 7 deletions .codeclimate.yml
@@ -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: []
14 changes: 9 additions & 5 deletions .gitignore
@@ -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
80 changes: 80 additions & 0 deletions .php_cs.dist
@@ -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)
;
19 changes: 19 additions & 0 deletions .readthedocs.yaml
@@ -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

0 comments on commit a6d7a72

Please sign in to comment.