update skeleton project

This commit is contained in:
Ignace Nyamagana Butera 2014-10-07 11:02:20 +02:00
parent 039103aec2
commit 25a47261c3
10 changed files with 107 additions and 59 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
vendor
build
composer.lock
docs
vendor

View File

@ -8,11 +8,12 @@ php:
- hhvm
before_script:
- composer self-update
- composer install
- pyrus install pear/PHP_CodeSniffer
- phpenv rehash
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-source --dev
script:
- phpcs --standard=psr2 src/
- phpunit --coverage-text
- phpunit --coverage-text --coverage-clover=coverage.clover
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

19
CHANGELOG.md Normal file
View File

@ -0,0 +1,19 @@
#Changelog
All Notable changes to `:package_name` will be documented in this file
## NEXT - YYYY-MM-DD
### Added
- Nothing
### Deprecated
- Nothing
### Fixed
- Nothing
### Remove
- Nothing
### Security
- Nothing

View File

@ -1,14 +1,16 @@
# League Skeleton
[![Build Status](https://travis-ci.org/thephpleague/statsd.png?branch=master)](https://travis-ci.org/thephpleague/statsd)
[![Total Downloads](https://poser.pugx.org/league/statsd/downloads.png)](https://packagist.org/packages/league/statsd)
[![Latest Stable Version](https://poser.pugx.org/league/statsd/v/stable.png)](https://packagist.org/packages/league/statsd)
[![Latest Version](https://img.shields.io/github/release/thephpleague/skeleton.svg?style=flat-square)](https://github.com/thephpleague/skeleton/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/thephpleague/skeleton/master.svg?style=flat-square)](https://travis-ci.org/thephpleague/skeleton)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/thephpleague/skeleton.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/skeleton/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/thephpleague/skeleton.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/skeleton)
[![Total Downloads](https://img.shields.io/packagist/dt/league/skeleton.svg?style=flat-square)](https://packagist.org/packages/league/skeleton)
**Replace Skeleton with your own package name in the above URLs**
:package_description
## Install
Via Composer
@ -21,7 +23,6 @@ Via Composer
}
```
## Usage
``` php
@ -30,25 +31,21 @@ echo $skeleton->echoPhrase('Hello, League!');
```
## Testing
``` bash
$ phpunit
```
## Contributing
Please see [CONTRIBUTING](https://github.com/thephpleague/:package_name/blob/master/CONTRIBUTING.md) for details.
## Credits
- [:author_name](https://github.com/:author_username)
- [All Contributors](https://github.com/thephpleague/:package_name/contributors)
## License
The MIT License (MIT). Please see [License File](https://github.com/thephpleague/:package_name/blob/master/LICENSE) for more information.

View File

@ -10,18 +10,30 @@
"authors": [
{
"name": ":author_name",
"email": ":author_email",
"homepage": ":author_website",
"email": "author_email@example.com",
"homepage": "http://author-website.example.com",
"role": "Developer"
}
],
"require-dev": {
"silex/silex": "~1.0"
"php" : ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit" : "4.*"
},
"autoload": {
"psr-0": {
"League": ["src", "tests"],
"Silex\\Provider": "src"
"psr-4": {
"League\\Skeleton\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"League\\Skeleton\\Test\\": "tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
}
}

View File

@ -1,14 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php">
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="League Test Suite">
<directory>tests/League</directory>
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/Silex</directory>
<directory suffix=".php">src/League</directory>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
</phpunit>

34
scrutinizer.yml Normal file
View File

@ -0,0 +1,34 @@
filter:
excluded_paths: [tests/*]
checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
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
tools:
external_code_coverage:
timeout: 600
runs: 3
php_code_coverage: false
php_code_sniffer:
config:
standard: PSR2
filter:
paths: ['src']
php_loc:
enabled: true
excluded_dirs: [vendor, tests]
php_cpd:
enabled: true
excluded_dirs: [vendor, tests]

View File

@ -1,32 +0,0 @@
<?php
namespace Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
/**
* Service provider for Silex
*/
class SkeletonServiceProvider implements ServiceProviderInterface
{
/**
* Register Service Provider
* @param Application $app Silex application instance
*/
public function register(Application $app)
{
}
/**
* Boot Method
* @param Application $app Silex application instance
* @codeCoverageIgnore
*/
public function boot(Application $app)
{
}
}

View File

@ -12,10 +12,11 @@ class SkeletonClass
{
}
/**
* Friendly welcome
*
* @param string $phrase Phrase to return
*
* @return string Returns the phrase passed in
*/
public function echoPhrase($phrase)