Initial Commit

This commit is contained in:
Marc Qualie 2013-08-07 18:33:05 +01:00
commit 8238b9e5cc
10 changed files with 240 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
vendor
composer.lock
docs

16
.travis.yml Normal file
View File

@ -0,0 +1,16 @@
language: php
php:
- 5.3
- 5.4
- 5.5
before_script:
- composer self-update
- composer install
- pyrus install pear/PHP_CodeSniffer
- phpenv rehash
script:
- phpcs --standard=psr2 src/
- phpunit --coverage-text

32
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,32 @@
# Contributing
Contributions are **welcome** and will be fully **credited**.
We accept contributions via Pull Requests on [Github](https://github.com/php-loep/statsd).
## Pull Requests
- **[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).
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
- **Document any change in behaviour** - Make sure the README and any other relevant documentation are kept up-to-date.
- **Consider our release cycle** - We try to follow semver. Randomly breaking public APIs is not an option.
- **Create topic 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 before submitting.
## Running Tests
``` bash
$ phpunit
```
**Happy coding**!

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2013 :author_name <:author_email>
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.

54
README.md Normal file
View File

@ -0,0 +1,54 @@
# League Skeleton
[![Build Status](https://travis-ci.org/php-loep/statsd.png?branch=master)](https://travis-ci.org/php-loep/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)
**Replace Statsd with your own package name in the above URLs**
:package_description
## Install
Via Composer
``` json
{
"require": {
"league/:package_name": "~1.0"
}
}
```
## Usage
``` php
$skeleton = new League\Skeleton();
echo $skeleton->echoPhrase('Hello, League!');
```
## Testing
``` bash
$ phpunit
```
## Contributing
Please see [CONTRIBUTING](https://github.com/php-loep/:package_name/blob/master/CONTRIBUTING.md) for details.
## Credits
- [:author_name](https://github.com/:author_username)
- [All Contributors](https://github.com/php-loep/:package_name/contributors)
## License
The MIT License (MIT). Please see [License File](https://github.com/php-loep/:package_name/blob/master/LICENSE) for more information.

27
composer.json Normal file
View File

@ -0,0 +1,27 @@
{
"name": "league/:package_name",
"description": ":package_description",
"keywords": [
"league",
"package"
],
"homepage": "https://github.com/php-loep/:package_name",
"license": "MIT",
"authors": [
{
"name": ":author_name",
"email": ":author_email",
"homepage": ":author_website",
"role": "Developer"
}
],
"require-dev": {
"silex/silex": "~1.0"
},
"autoload": {
"psr-0": {
"League": ["src", "tests"],
"Silex\\Provider": "src"
}
}
}

14
phpunit.xml.dist Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="League Test Suite">
<directory>tests/League</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/Silex</directory>
<directory suffix=".php">src/League</directory>
</whitelist>
</filter>
</phpunit>

View File

@ -0,0 +1,25 @@
<?php
namespace League\Skeleton;
class SkeletonClass
{
/**
* Create a new Skeleton Instance
*/
public function __construct()
{
}
/**
* Friendly welcome
* @param string $phrase Phrase to return
* @return string Returns the phrase passed in
*/
public function echoPhrase($phrase)
{
return $phrase;
}
}

View File

@ -0,0 +1,32 @@
<?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 Aplication $app Silex application instance
* @codeCoverageIgnore
*/
public function boot(Application $app)
{
}
}

View File

@ -0,0 +1,16 @@
<?php
namespace League\Skeleton\Test;
class ExampleTest extends \PHPUnit_Framework_TestCase
{
/**
* Test thet true does in fact equal true
*/
public function testTrueIsTrue()
{
$this->assertTrue(true);
}
}