Skip to content

Commit 7c1e156

Browse files
committed
Initial commit of part 1 of the tutorial code
0 parents  commit 7c1e156

File tree

14 files changed

+401
-0
lines changed

14 files changed

+401
-0
lines changed

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.travis.yml export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/scrutinizer.yml export-ignore
10+
/tests export-ignore

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# IntelliJ - PhpStorm and PyCharm
2+
.idea
3+
*.iml
4+
*.ipr
5+
*.iws
6+
7+
# Netbeans
8+
nbproject
9+
.nbproject
10+
.nbproject/*
11+
nbproject/*
12+
nbproject/private/
13+
build/
14+
nbbuild/
15+
dist/
16+
nbdist/
17+
nbactions.xml
18+
nb-configuration.xml
19+
20+
# Mac OSX
21+
.DS_Store
22+
# Thumbnails
23+
._*
24+
# Files that might appear on external disk
25+
.Spotlight-V100
26+
.Trashes
27+
28+
# SublimeText project files
29+
/*.sublime-project
30+
*.sublime-workspace
31+
32+
build
33+
composer.lock
34+
docs
35+
vendor
36+
37+
index.php

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
- 5.5
7+
- 5.6
8+
- hhvm
9+
10+
before_script:
11+
- travis_retry composer self-update
12+
- travis_retry composer install --no-interaction --prefer-source --dev
13+
14+
script:
15+
- phpunit --coverage-text --coverage-clover=coverage.clover
16+
17+
after_script:
18+
- wget https://scrutinizer-ci.com/ocular.phar
19+
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#Changelog
2+
All Notable changes to `:package_name` will be documented in this file
3+
4+
## NEXT - YYYY-MM-DD
5+
6+
### Added
7+
- Nothing
8+
9+
### Deprecated
10+
- Nothing
11+
12+
### Fixed
13+
- Nothing
14+
15+
### Remove
16+
- Nothing
17+
18+
### Security
19+
- Nothing

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/thephpleague/:package_name).
6+
7+
8+
## Pull Requests
9+
10+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
11+
12+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
14+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15+
16+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17+
18+
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
22+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.
23+
24+
25+
## Running Tests
26+
27+
``` bash
28+
$ phpunit
29+
```
30+
31+
32+
**Happy coding**!

LICENSE.md

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

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# League Skeleton
2+
3+
[![Latest Version](https://img.shields.io/github/release/thephpleague/skeleton.svg?style=flat-square)](https://github.com/thephpleague/skeleton/releases)
4+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
5+
[![Build Status](https://img.shields.io/travis/thephpleague/skeleton/master.svg?style=flat-square)](https://travis-ci.org/thephpleague/skeleton)
6+
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/thephpleague/skeleton.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/skeleton/code-structure)
7+
[![Quality Score](https://img.shields.io/scrutinizer/g/thephpleague/skeleton.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/skeleton)
8+
[![Total Downloads](https://img.shields.io/packagist/dt/league/skeleton.svg?style=flat-square)](https://packagist.org/packages/league/skeleton)
9+
10+
**Note:** Replace `skeleton` with the correct package name in the above URLs, then delete this line.
11+
12+
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what
13+
PSRs you support to avoid any confusion with users and contributors.
14+
15+
## Install
16+
17+
Via Composer
18+
19+
``` bash
20+
$ composer require league/skeleton
21+
```
22+
23+
## Usage
24+
25+
``` php
26+
$skeleton = new League\Skeleton();
27+
echo $skeleton->echoPhrase('Hello, League!');
28+
```
29+
30+
## Testing
31+
32+
``` bash
33+
$ phpunit
34+
```
35+
36+
## Contributing
37+
38+
Please see [CONTRIBUTING](https://github.com/thephpleague/:package_name/blob/master/CONTRIBUTING.md) for details.
39+
40+
## Credits
41+
42+
- [:author_name](https://github.com/:author_username)
43+
- [All Contributors](https://github.com/thephpleague/:package_name/contributors)
44+
45+
## License
46+
47+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "swader/diffbot_client",
3+
"description": "A PHP wrapper for using Diffbot's API",
4+
"keywords": [
5+
"diffbot", "api", "wrapper", "client"
6+
],
7+
"homepage": "https://github.com/swader/diffbot_client",
8+
"license": "MIT",
9+
"authors": [
10+
{
11+
"name": "Bruno Skvorc",
12+
"email": "bruno@skvorc.me",
13+
"homepage": "http://bitfalls.com",
14+
"role": "Developer"
15+
}
16+
],
17+
"require": {
18+
"php" : ">=5.5.0"
19+
},
20+
"require-dev": {
21+
"phpunit/phpunit" : "4.*"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"Swader\\Diffbot\\": "src"
26+
}
27+
},
28+
"autoload-dev": {
29+
"psr-4": {
30+
"Swader\\Diffbot\\Test\\": "tests"
31+
}
32+
},
33+
"extra": {
34+
"branch-alias": {
35+
"dev-master": "1.0-dev"
36+
}
37+
}
38+
}

phpunit.xml.dist

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php"
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
verbose="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnFailure="false">
12+
<testsuites>
13+
<testsuite name="League Test Suite">
14+
<directory>tests</directory>
15+
</testsuite>
16+
</testsuites>
17+
<filter>
18+
<whitelist>
19+
<directory suffix=".php">src/</directory>
20+
</whitelist>
21+
</filter>
22+
<logging>
23+
<log type="tap" target="build/report.tap"/>
24+
<log type="junit" target="build/report.junit.xml"/>
25+
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
26+
<log type="coverage-text" target="build/coverage.txt"/>
27+
<log type="coverage-clover" target="build/logs/clover.xml"/>
28+
</logging>
29+
</phpunit>

scrutinizer.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
filter:
2+
excluded_paths: [tests/*]
3+
checks:
4+
php:
5+
code_rating: true
6+
remove_extra_empty_lines: true
7+
remove_php_closing_tag: true
8+
remove_trailing_whitespace: true
9+
fix_use_statements:
10+
remove_unused: true
11+
preserve_multiple: false
12+
preserve_blanklines: true
13+
order_alphabetically: true
14+
fix_php_opening_tag: true
15+
fix_linefeed: true
16+
fix_line_ending: true
17+
fix_identation_4spaces: true
18+
fix_doc_comments: true
19+
tools:
20+
external_code_coverage:
21+
timeout: 600
22+
runs: 3
23+
php_code_coverage: false
24+
php_code_sniffer:
25+
config:
26+
standard: PSR2
27+
filter:
28+
paths: ['src']
29+
php_loc:
30+
enabled: true
31+
excluded_dirs: [vendor, tests]
32+
php_cpd:
33+
enabled: true
34+
excluded_dirs: [vendor, tests]

0 commit comments

Comments
 (0)