Skip to content

Commit 1d2812b

Browse files
committed
Add boilerplate files
1 parent 8ce410c commit 1d2812b

File tree

11 files changed

+145
-74
lines changed

11 files changed

+145
-74
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
.php_cs.cache
21
vendor/
2+
build/
33
.puli/
44
puli.json
55
composer.lock
6-
6+
.php_cs.cache
7+
phpspec.yml
8+
phpunit.xml

.php_cs

Lines changed: 9 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,13 @@
11
<?php
22

3-
$header = <<<EOF
4-
This file is part of the laravel-httplug Project.
3+
/*
4+
* In order to make it work, fabpot/php-cs-fixer and sllh/php-cs-fixer-styleci-bridge must be installed globally
5+
* with composer.
6+
*
7+
* @link https://github.com/Soullivaneuh/php-cs-fixer-styleci-bridge
8+
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
9+
*/
510

6-
(c) laravel-httplug <mathieu.santostefano@gmail.com>
7-
EOF;
11+
use SLLH\StyleCIBridge\ConfigBridge;
812

9-
Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);
10-
11-
$finder = Symfony\Component\Finder\Finder::create()
12-
->notPath('bootstrap/cache')
13-
->notPath('storage')
14-
->notPath('vendor')
15-
->in(__DIR__)
16-
->name('*.php')
17-
->ignoreDotFiles(true)
18-
->ignoreVCS(true);
19-
20-
$fixers = [
21-
'header_comment',
22-
'-psr0',
23-
'-php_closing_tag',
24-
'blankline_after_open_tag',
25-
'concat_without_spaces',
26-
'double_arrow_multiline_whitespaces',
27-
'duplicate_semicolon',
28-
'empty_return',
29-
'extra_empty_lines',
30-
'include',
31-
'join_function',
32-
'list_commas',
33-
'multiline_array_trailing_comma',
34-
'namespace_no_leading_whitespace',
35-
'newline_after_open_tag',
36-
'no_blank_lines_after_class_opening',
37-
'no_empty_lines_after_phpdocs',
38-
'object_operator',
39-
'operators_spaces',
40-
'phpdoc_indent',
41-
'phpdoc_no_access',
42-
'phpdoc_no_package',
43-
'phpdoc_scalar',
44-
'phpdoc_short_description',
45-
'phpdoc_to_comment',
46-
'phpdoc_trim',
47-
'phpdoc_type_to_var',
48-
'phpdoc_var_without_name',
49-
'remove_leading_slash_use',
50-
'remove_lines_between_uses',
51-
'return',
52-
'self_accessor',
53-
'single_array_no_trailing_comma',
54-
'single_blank_line_before_namespace',
55-
'single_quote',
56-
'spaces_before_semicolon',
57-
'spaces_cast',
58-
'standardize_not_equal',
59-
'ternary_spaces',
60-
'trim_array_spaces',
61-
'unalign_equals',
62-
'unary_operators_spaces',
63-
'whitespacy_lines',
64-
'multiline_spaces_before_semicolon',
65-
'short_array_syntax',
66-
'short_echo_tag',
67-
];
68-
69-
return Symfony\CS\Config\Config::create()
70-
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
71-
->fixers($fixers)
72-
->finder($finder)
73-
->setUsingCache(true);
13+
return ConfigBridge::create();

.scrutinizer.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
filter:
2+
paths: [src/*]
3+
checks:
4+
php:
5+
code_rating: true
6+
duplication: true
7+
tools:
8+
external_code_coverage: true

.styleci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
preset: symfony
2+
3+
finder:
4+
exclude:
5+
- "spec"
6+
path:
7+
- "src"
8+
9+
enabled:
10+
- short_array_syntax

.travis.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
language: php
2+
3+
sudo: false
4+
5+
cache:
6+
directories:
7+
- $HOME/.composer/cache
8+
9+
php:
10+
- 5.4
11+
- 5.5
12+
- 5.6
13+
- 7.0
14+
- hhvm
15+
16+
env:
17+
global:
18+
- TEST_COMMAND="composer test"
19+
20+
branches:
21+
except:
22+
- /^analysis-.*$/
23+
24+
matrix:
25+
fast_finish: true
26+
include:
27+
- php: 5.4
28+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
29+
30+
before_install:
31+
- travis_retry composer self-update
32+
33+
install:
34+
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
35+
36+
script:
37+
- $TEST_COMMAND
38+
39+
after_success:
40+
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
41+
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Change Log
2+
3+
4+
## Unreleased

CONTRIBUTING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please see http://docs.php-http.org/en/latest/development/contributing.html

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2015-2016 PHP HTTP Team <team@php-http.org>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,43 @@
11
# Laravel-Httplug
22

3+
[![Latest Version](https://img.shields.io/github/release/php-http/laravel-httplug.svg?style=flat-square)](https://github.com/php-http/laravel-httplug/releases)
4+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
5+
[![Build Status](https://img.shields.io/travis/php-http/laravel-httplug.svg?style=flat-square)](https://travis-ci.org/php-http/laravel-httplug)
6+
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/laravel-httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/laravel-httplug)
7+
[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/laravel-httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/laravel-httplug)
8+
[![Total Downloads](https://img.shields.io/packagist/dt/php-http/laravel-httplug.svg?style=flat-square)](https://packagist.org/packages/php-http/laravel-httplug)
39

10+
## Install
411

5-
## Installation
12+
Via Composer
613

7-
## Configuration
14+
``` bash
15+
$ composer require php-http/laravel-httplug
16+
```
817

9-
## Development
18+
19+
## Usage
20+
21+
22+
## Testing
23+
24+
``` bash
25+
$ composer test
26+
```
27+
28+
29+
## Contributing
30+
31+
Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html).
1032

1133
#### Attention
1234
*The `./src/Http` directory is named as well cause of Laravel structure, it's not related to Httplug library.*
1335

36+
## Security
37+
38+
If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org).
39+
40+
41+
## License
42+
43+
The MIT License (MIT). Please see [License File](LICENSE) for more information.

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "php-http/laravel-httplug",
33
"description": "Laravel package to integrate the Httplug generic HTTP client into Laravel",
44
"keywords": ["http", "discovery", "adapter", "message", "factory", "bundle", "httplug", "php-http", "laravel"],
5+
"homepage": "http://php-http.org",
56
"license": "MIT",
67
"authors": [
78
{
@@ -10,9 +11,11 @@
1011
}
1112
],
1213
"require": {
14+
"php": ">=5.4",
1315
"illuminate/support": "~5",
1416
"php-http/httplug": "1.*"
1517
},
18+
"prefer-stable": true,
1619
"minimum-stability": "dev",
1720
"autoload": {
1821
"psr-4": {
@@ -22,5 +25,9 @@
2225
"require-dev": {
2326
"phpunit/phpunit": "^5.1",
2427
"fabpot/php-cs-fixer": "^1.11"
28+
},
29+
"scripts": {
30+
"test": "",
31+
"test-ci": ""
2532
}
2633
}

0 commit comments

Comments
 (0)