forked from php-api-clients/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Very basic github client that lets you fetch user details
- Loading branch information
1 parent
70eb732
commit 13b9fc2
Showing
23 changed files
with
794 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// the list of docker images to run against | ||
images="vectorface/hhvm"; | ||
|
||
|
||
// a flag indicating whether to run the syntax check | ||
checkSyntax="true"; | ||
// the syntax command to execute | ||
syntaxCommand="find /opt/source -type f -name \"*.php\" ! -path \"*/vendor/*\" -print0 | xargs -0 -n 1 -P 8 php -l | grep -v 'No syntax errors'" | ||
|
||
// a flag indicating whether to run the phpunit test suite | ||
runTests="true"; | ||
// the phpunit command to execute | ||
unitTestsCommand="/opt/source/vendor/bin/phpunit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.json] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Ignoring files for distribution archieves | ||
examples/ export-ignore | ||
tests/ export-ignore | ||
.travis.yml export-ignore | ||
.gitignore export-ignore | ||
.gitattributes export-ignore | ||
.scrutinizer.yml export-ignore | ||
phpunit.xml.dist export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/vendor/ | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
filter: | ||
paths: [src/*] | ||
excluded_paths: [examples/*, tests/*] | ||
tools: | ||
external_code_coverage: true | ||
php_analyzer: true | ||
php_hhvm: true | ||
php_sim: true | ||
php_pdepend: true | ||
sensiolabs_security_checker: true | ||
php_changetracking: true | ||
php_code_sniffer: | ||
enabled: true | ||
config: | ||
tab_width: 0 | ||
encoding: utf8 | ||
ruleset: ~ | ||
standard: "PSR2" | ||
php_cs_fixer: | ||
enabled: true | ||
config: | ||
level: psr2 | ||
php_mess_detector: | ||
enabled: true | ||
config: | ||
ruleset: ~ | ||
code_size_rules: | ||
cyclomatic_complexity: true | ||
npath_complexity: true | ||
excessive_method_length: true | ||
excessive_class_length: true | ||
excessive_parameter_list: true | ||
excessive_public_count: true | ||
too_many_fields: true | ||
too_many_methods: true | ||
excessive_class_complexity: true | ||
design_rules: | ||
exit_expression: true | ||
eval_expression: true | ||
goto_statement: true | ||
number_of_class_children: true | ||
depth_of_inheritance: true | ||
coupling_between_objects: true | ||
unused_code_rules: | ||
unused_private_field: true | ||
unused_local_variable: true | ||
unused_private_method: true | ||
unused_formal_parameter: true | ||
naming_rules: | ||
short_variable: | ||
minimum: 3 | ||
long_variable: | ||
maximum: 20 | ||
short_method: | ||
minimum: 3 | ||
constructor_conflict: true | ||
constant_naming: true | ||
boolean_method_name: true | ||
controversial_rules: | ||
superglobals: true | ||
camel_case_class_name: true | ||
camel_case_property_name: true | ||
camel_case_method_name: true | ||
camel_case_parameter_name: true | ||
camel_case_variable_name: true | ||
checks: | ||
php: | ||
code_rating: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
preset: psr2 | ||
|
||
risky: false | ||
|
||
linting: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
language: php | ||
sudo: false | ||
|
||
## Cache composer bits | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
## PHP versions we test against | ||
php: | ||
- 7.0 | ||
- hhvm | ||
|
||
## Build matrix for lowest and highest possible targets | ||
matrix: | ||
include: | ||
- php: 7.0 | ||
env: dependencies=lowest | ||
- php: hhvm | ||
env: dependencies=lowest | ||
- php: 7.0 | ||
env: dependencies=highest | ||
- php: hhvm | ||
env: dependencies=highest | ||
allow_failures: | ||
- php: hhvm | ||
|
||
## Update composer and configure authentication token | ||
before_install: | ||
- composer self-update | ||
|
||
## Install or update dependencies | ||
install: | ||
- if [ -z "$dependencies" ]; then composer install --prefer-dist; fi; | ||
- if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi; | ||
- if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi; | ||
- composer show | ||
|
||
## Run the actual test | ||
script: make travis | ||
|
||
## Gather coverage and set it to coverage servers | ||
after_script: make travis-coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Contributing | ||
|
||
Pull requests are highly appreciated. Here's a quick guide. | ||
|
||
Fork, then clone the repo: | ||
|
||
git clone [email protected]:your-username/php-github-client.git | ||
|
||
Set up your machine: | ||
|
||
composer install | ||
|
||
Make sure the tests pass: | ||
|
||
make unit | ||
|
||
Make sure the tests pass on all supported PHP versions (requires docker): | ||
|
||
make dunit | ||
|
||
Make your change. Add tests for your change. Make the tests pass: | ||
|
||
make dunit && make unit | ||
|
||
Before committing and submitting your pull request make sure it passes PSR2 coding style, unit tests pass and pass on all supported PHP versions: | ||
|
||
make contrib | ||
|
||
Push to your fork and [submit a pull request][pr]. | ||
|
||
[pr]: https://help.github.com/articles/creating-a-pull-request/ | ||
|
||
At this point you're waiting on me. I like to at least comment on pull requests | ||
within a day or two. I may suggest some changes or improvements or alternatives. | ||
|
||
Some things that will increase the chance that your pull request is accepted: | ||
|
||
* Write tests. | ||
* Follow PSR2 (travis will also check for this). | ||
* Write a [good commit message][commit]. | ||
|
||
[commit]: http://chris.beams.io/posts/git-commit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
all: cs dunit unit | ||
travis: cs travis-unit | ||
contrib: cs dunit unit | ||
|
||
init: | ||
if [ ! -d vendor ]; then composer install; fi; | ||
|
||
cs: init | ||
./vendor/bin/phpcs --standard=PSR2 src/ | ||
|
||
unit: init | ||
./vendor/bin/phpunit --coverage-text --coverage-html covHtml | ||
|
||
dunit: init | ||
./vendor/bin/dunit | ||
|
||
travis-unit: init | ||
./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml | ||
|
||
travis-coverage: init | ||
if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,38 @@ | ||
# php-github-client | ||
# TravisCI API Client for PHP 7 | ||
|
||
[![Build Status](https://travis-ci.org/WyriHaximus/php-github-client.svg?branch=master)](https://travis-ci.org/WyriHaximus/php-github-client) | ||
[![Latest Stable Version](https://poser.pugx.org/WyriHaximus/github-client/v/stable.png)](https://packagist.org/packages/WyriHaximus/github-client) | ||
[![Total Downloads](https://poser.pugx.org/WyriHaximus/github-client/downloads.png)](https://packagist.org/packages/WyriHaximus/github-client) | ||
[![Code Coverage](https://scrutinizer-ci.com/g/WyriHaximus/php-github-client/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/WyriHaximus/php-github-client/?branch=master) | ||
[![License](https://poser.pugx.org/WyriHaximus/github-client/license.png)](https://packagist.org/packages/wyrihaximus/github-client) | ||
[![PHP 7 ready](http://php7ready.timesplinter.ch/WyriHaximus/php-github-client/badge.svg)](https://travis-ci.org/WyriHaximus/php-github-client) | ||
|
||
|
||
# Goals | ||
|
||
* 100% Github [API](https://developer.github.com/v3/) support | ||
* Both synchronous and asynchronous | ||
|
||
# License | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 Cees-Jan Kiewiet | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.