Checkout Config
filter:
excluded_paths:
- 'tests/*'
- 'vendor/*'
before_commands:
- 'composer install'
checks:
php:
code_rating: true
duplication: true
coding_style:
php:
spaces:
around_operators:
concatenation: true
build:
environment:
mysql: 5.5
postgresql: true
mongodb: false
elasticsearch: false
redis: false
memcached: false
neo4j: false
rabbitmq: false
dependencies:
before:
- 'sudo mysql -e "CREATE DATABASE phuria_test"'
- 'sudo mysql phuria_test < tests/Phuria/SQLBuilder/Test/Resources/schema.sql'
tests:
override:
-
command: 'phpunit --configuration travis.phpunit.xml'
coverage:
file: 'coverage.clover'
format: 'clover'
after:
- 'wget https://scrutinizer-ci.com/ocular.phar'
- 'php ocular.phar code-coverage:upload --format=php-clover --repository="g/phuria/sql-builder" coverage.clover'
tools:
external_code_coverage: true
php_mess_detector: true
php_code_sniffer: true
sensiolabs_security_checker: true
php_code_coverage: true
php_pdepend: true
php_loc:
enabled: true
excluded_dirs: [vendor, tests]
php_cpd:
enabled: true
excluded_dirs: [vendor, tests]
php_sim: false
Repository Config
filter:
excluded_paths:
- 'tests/*'
checks:
php:
uppercase_constants: true
use_self_instead_of_fqcn: true
simplify_boolean_return: true
return_doc_comments: true
return_doc_comment_if_not_inferrable: true
remove_extra_empty_lines: true
properties_in_camelcaps: true
prefer_while_loop_over_for_loop: true
phpunit_assertions: true
parameters_in_camelcaps: true
parameter_doc_comments: true
param_doc_comment_if_not_inferrable: true
no_goto: true
naming_conventions:
local_variable: '^[a-z][a-zA-Z0-9]*$'
abstract_class_name: ^Abstract|Factory$
utility_class_name: 'Utils?$'
constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$'
property_name: '^[a-z][a-zA-Z0-9]*$'
method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$'
parameter_name: '^[a-z][a-zA-Z0-9]*$'
interface_name: '^[A-Z][a-zA-Z0-9]*Interface$'
type_name: '^[A-Z][a-zA-Z0-9]*$'
exception_name: '^[A-Z][a-zA-Z0-9]*Exception$'
isser_method_name: '^(?:is|has|should|may|supports)'
function_in_camel_caps: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: false
order_alphabetically: true
encourage_single_quotes: true
classes_in_camel_caps: true
check_method_contracts:
verify_interface_like_constraints: true
verify_documented_constraints: true
verify_parent_constraints: true
avoid_multiple_statements_on_same_line: true
avoid_fixme_comments: true
avoid_todo_comments: true
align_assignments: true
coding_style:
php:
spaces:
around_operators:
concatenation: true
build: true