Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Fixes #5 updated library up to 5 + composer
Browse files Browse the repository at this point in the history
  • Loading branch information
tonydspaniard committed Jul 5, 2017
1 parent c744a2d commit d48d6fb
Show file tree
Hide file tree
Showing 8 changed files with 1,348 additions and 402 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -22,4 +22,7 @@ nbproject

# mac deployment helpers
switch
index
index

# php cs fixer
.php_cs.cache
33 changes: 33 additions & 0 deletions .php_cs
@@ -0,0 +1,33 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
;

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(array(
'@PSR2' => true,
'array_syntax' => array('syntax' => 'short'),
'combine_consecutive_unsets' => true,
// 'header_comment' => array('header' => $header),
'no_extra_consecutive_blank_lines' => array(
'break',
'continue',
'extra',
'return',
'throw',
'use',
'parenthesis_brace_block',
'square_brace_block',
'curly_brace_block'
),
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'psr4' => true,
'strict_comparison' => true,
))
->setFinder($finder)
;
8 changes: 4 additions & 4 deletions .travis.yml
@@ -1,14 +1,14 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- hhvm
- 7.0
- 7.1

install:
- composer self-update
- composer global require "fxp/composer-asset-plugin:1.0.0"
- composer global require "fxp/composer-asset-plugin:^1.3"
- composer install

before_script:
Expand All @@ -19,4 +19,4 @@ script:
- phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -75,6 +75,15 @@ Further Information
Please, check the [HighCharts site](http://www.highcharts.com/) documentation for further
information about its configuration options.

## Using code fixer

We have added a PHP code fixer to standardize our code. It includes Symfony, PSR2 and some contributors rules.

```bash
./vendor/bin/php-cs-fixer fix ./src --config .php_cs
```


## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
Expand Down
18 changes: 13 additions & 5 deletions composer.json
Expand Up @@ -28,10 +28,11 @@
},
"require": {
"yiisoft/yii2": "*",
"bower-asset/highcharts-release": "4.1.4"
"bower-asset/highcharts-release": "5.0.*"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"friendsofphp/php-cs-fixer": "^2.0",
"scrutinizer/ocular": "~1.1"
},
"autoload": {
Expand All @@ -42,9 +43,16 @@
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"asset-installer-paths": {
"bower-asset-library": "vendor/bower"
}
},
"fxp-asset": {
"installer-paths": {
"bower-asset-library": "vendor/bower"
},
"vcs-driver-options": {
"github-no-api": true
},
"git-skip-update": "2 days",
"pattern-skip-version": "(-build|-patch)"
}
}
}

0 comments on commit d48d6fb

Please sign in to comment.