Add CI files

pull/2487/head
jmontoyaa 7 years ago
parent f60554d827
commit 12e4f6f958
  1. 1
      .gitignore
  2. 3
      .php_cs
  3. 46
      .php_cs.dist
  4. 2
      .travis.yml

1
.gitignore vendored

@ -58,7 +58,6 @@ web/assets/*
###< symfony/framework-bundle ###
###> friendsofphp/php-cs-fixer ###
.php_cs
.php_cs.cache
###< friendsofphp/php-cs-fixer ###

@ -0,0 +1,3 @@
<?php
return require_once __DIR__.'/.php_cs.dist';

@ -0,0 +1,46 @@
<?php
$header = '/* For licensing terms, see /license.txt */';
$rules = [
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => [
'syntax' => 'short',
],
'header_comment' => [
'header' => $header,
],
'no_extra_consecutive_blank_lines' => true,
'no_php4_constructor' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'@PHP56Migration' => true,
'@PHP56Migration:risky' => true,
'@PHPUnit57Migration:risky' => true,
// To be tested before insertion:
// 'strict_comparison' => true,
// 'strict_param' => true,
// 'php_unit_strict' => true,
];
$finder = PhpCsFixer\Finder::create()
->exclude('app')
->exclude('documentation')
->exclude('vendor')
->exclude('tests')
->exclude('web')
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
//'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder)
;

@ -26,7 +26,7 @@ php:
env:
global:
- VHOST_URL=localhost
- CHAMILO_VERSION=1.11.x
- CHAMILO_VERSION=master
before_install:
#- sudo apt-get update

Loading…
Cancel
Save