Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start #1

Merged
merged 2 commits into from
Jul 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src_dir: src
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/.scrutinizer.yml export-ignore
/tests export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
composer.lock
docs
vendor
27 changes: 27 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()
->files()
->in(__DIR__)
->exclude('build')
->exclude('vendor')
->notName('*.phar')
->notName('CONTRIBUTING')
->ignoreDotFiles(true)
->ignoreVCS(true);

return Symfony\CS\Config\Config::create()
// use default PSR-2_LEVEL:
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
->fixers(
[
'header_comment',
'phpdoc_order',
'ordered_use',
'short_array_syntax',
'strict',
'strict_param',
]
)
->finder($finder)
->setUsingCache(true);
1 change: 1 addition & 0 deletions .php_cs.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:3:{s:7:"version";s:53:"1.9.1:v1.9.1#f2c2c5527113f346d77eb790e62395fe8de58c4f";s:6:"fixers";a:26:{i:0;s:6:"braces";i:1;s:6:"elseif";i:2;s:8:"encoding";i:3;s:10:"eof_ending";i:4;s:19:"function_call_space";i:5;s:20:"function_declaration";i:6;s:14:"header_comment";i:7;s:11:"indentation";i:8;s:20:"line_after_namespace";i:9;s:8:"linefeed";i:10;s:19:"lowercase_constants";i:11;s:18:"lowercase_keywords";i:12;s:21:"method_argument_space";i:13;s:12:"multiple_use";i:14;s:11:"ordered_use";i:15;s:11:"parenthesis";i:16;s:15:"php_closing_tag";i:17;s:12:"phpdoc_order";i:18;s:4:"psr0";i:19;s:18:"short_array_syntax";i:20;s:9:"short_tag";i:21;s:25:"single_line_after_imports";i:22;s:6:"strict";i:23;s:12:"strict_param";i:24;s:15:"trailing_spaces";i:25;s:10:"visibility";}s:6:"hashes";a:3:{s:24:"src\Gwa\MockWPBridge.php";i:-314380194;s:20:"src\Gwa\WPBridge.php";i:-1930432888;s:29:"src\Gwa\WPBridgeInterface.php";i:1234789943;}}
167 changes: 167 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
filter:
paths: ['src/*']
excluded_paths: [tests/*, vendor/*]

checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: false
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
no_unnecessary_function_call_in_for_loop: true
avoid_unnecessary_concatenation: true
duplication: true
prefer_sapi_constant: true
variable_existence: true
useless_calls: true
use_statement_alias_conflict: true
unused_variables: true
unused_properties: true
unused_parameters: true
unused_methods: true
unreachable_code: true
sql_injection_vulnerabilities: true
security_vulnerabilities: true
precedence_mistakes: true
precedence_in_conditions: true
parameter_non_unique: true
no_property_on_interface: true
no_non_implemented_abstract_methods: true
deprecated_code_usage: true
closure_use_not_conflicting: true
closure_use_modifiable: true
avoid_useless_overridden_methods: true
avoid_conflicting_incrementers: true
assignment_of_null_return: true
verify_access_scope_valid: true
too_many_arguments: true
symfony_request_injection: true
parameter_doc_comments: true
argument_type_checks: true
avoid_corrupting_byteorder_marks: true
avoid_entity_manager_injection: true
catch_class_exists: true
encourage_shallow_comparison: false
foreach_traversable: true
foreach_usable_as_reference: true
instanceof_class_exists: true
method_calls_on_non_object: true
missing_arguments: true
no_duplicate_arguments: false
require_php_tag_first: true
return_doc_comments: true
verify_property_names: true
verify_argument_usable_as_reference: true
use_self_instead_of_fqcn: true
uppercase_constants: true
simplify_boolean_return: true
properties_in_camelcaps: true
prefer_while_loop_over_for_loop: true
phpunit_assertions: true
parameters_in_camelcaps: true
param_doc_comment_if_not_inferrable: true
optional_parameters_at_the_end: true
no_short_variable_names:
minimum: '3'
no_short_method_names:
minimum: ''
no_goto: true
newline_at_end_of_file: true
more_specific_types_in_doc_comments: true
line_length:
max_length: '160'
function_in_camel_caps: true
fix_line_ending: true
encourage_single_quotes: true
encourage_postdec_operator: true
classes_in_camel_caps: true
avoid_unnecessary_concatenation: true
avoid_todo_comments: true
avoid_multiple_statements_on_same_line: true
avoid_fixme_comments: true

build:
environment:
php: '5.4.0'
dependencies:
override:
- 'composer install'

tools:
external_code_coverage:
timeout: 600
runs: 3
php_changetracking: true

php_code_sniffer:
config:
standard: PSR-2

php_cs_fixer:
enabled: true
extensions:
- php
command: php-cs-fixer
config:
level: all
filter:
excluded_paths:
- 'bin/*'
- 'vendor/*'
- 'tests/*'

php_loc:
enabled: true
extensions:
- php
command: phploc
filter:
excluded_paths:
- bin
- vendor
- tests/*

php_mess_detector:
enabled: true
extensions:
- php
command: phpmd
filter:
excluded_paths:
- 'bin/*'
- 'vendor/*'
- 'tests/*'
php_cpd:
enabled: false

php_analyzer:
enabled: true
extensions:
- php
filter:
excluded_paths:
- 'bin/*'
- 'vendor/*'
- 'tests/*'

php_pdepend:
enabled: true
suffixes:
- php
command: pdepend
excluded_dirs:
- bin
- vendor
- tests/*

sensiolabs_security_checker: true
55 changes: 55 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
language: php

php:
- 5.5.9
- 5.5
- 5.6
- 7.0
- hhvm
- nightly
- hhvm-nightly

env:
global:
- setup=basic

matrix:
include:
- php: 5.5.9
env: setup=lowest
- php: 5.5.9
env: setup=stable
allow_failures:
- env: setup=lowest
- env: setup=stable
- php: 7.0
- php: nightly
- php: hhvm
- php: hhvm-nightly
fast_finish: true

sudo: false

cache:
directories:
- $HOME/.composer/cache

before_install:
- if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then git fetch origin "refs/pull/$TRAVIS_PULL_REQUEST/head"; else git fetch origin "$TRAVIS_BRANCH"; fi;
- if [[ "$TRAVIS_COMMIT" != `git rev-parse FETCH_HEAD` ]]; then echo "Pull request or branch commit hash has changed, aborting."; exit 1; fi;
- composer self-update
- travis_retry composer self-update
- travis_retry composer install --prefer-source --no-interaction
- OCULAR_ENV='5.4'

install:
- curl http://get.sensiolabs.org/security-checker.phar -o security-checker.phar
- if [[ $setup = 'basic' ]]; then travis_retry composer install --no-interaction --prefer-source; fi
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-source --no-interaction --prefer-stable; fi
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-source --no-interaction --prefer-lowest --prefer-stable; fi


script:
- php -n security-checker.phar security:check --format=simple
- vendor/bin/phpunit --verbose --coverage-text --coverage-clover=build/logs/coverage.clover
- if [ $(phpenv version-name) = $OCULAR_ENV ]; then wget https://scrutinizer-ci.com/ocular.phar; php ocular.phar code-coverage:upload --format=php-clover build/logs/coverage.clover; fi
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

All Notable changes to `MockeryWPBridge` will be documented in this file

## NEXT - YYYY-MM-DD

### Added
- Nothing

### Deprecated
- Nothing

### Fixed
- Nothing

### Removed
- Nothing

### Security
- Nothing
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing

Contributions are **welcome** and will be fully **credited**.

We accept contributions via Pull Requests on [Github](https://github.com/gwa/MockeryWPBridge).


## Pull Requests

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer check-cs`` and fix it with ``$ composer fix-cs``.


- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.

- **Create feature branches** - Don't ask us to pull from your master branch.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **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](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.


## Running Tests

``` bash
$ phpunit
```


**Happy coding**!
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Great White Ark
Copyright (c) 2015 MockeryWPBridge

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading