Skip to content

Commit ec94875

Browse files
committed
add skeleton
0 parents  commit ec94875

16 files changed

+388
-0
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.gitattributes

+10
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

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build
2+
composer.lock
3+
docs
4+
vendor

.scrutinizer.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
filter:
2+
excluded_paths: [tests/*]
3+
4+
checks:
5+
php:
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+

.travis.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: php
2+
3+
php:
4+
- 7.0
5+
6+
env:
7+
matrix:
8+
- COMPOSER_FLAGS="--prefer-lowest"
9+
- COMPOSER_FLAGS=""
10+
11+
before_script:
12+
- travis_retry composer self-update
13+
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
14+
15+
script:
16+
- phpunit --coverage-text --coverage-clover=coverage.clover
17+
18+
after_script:
19+
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover

CHANGELOG.md

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

CONTRIBUTING.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
Please read and understand the contribution guide before creating an issue or pull request.
6+
7+
## Etiquette
8+
9+
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
10+
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
11+
extremely unfair for them to suffer abuse or anger for their hard work.
12+
13+
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
14+
world that developers are civilized and selfless people.
15+
16+
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
17+
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
18+
19+
## Viability
20+
21+
When requesting or submitting new features, first consider whether it might be useful to others. Open
22+
source projects are used by many developers, who may have entirely different needs to your own. Think about
23+
whether or not your feature is likely to be used by other users of the project.
24+
25+
## Procedure
26+
27+
Before filing an issue:
28+
29+
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
30+
- Check to make sure your feature suggestion isn't already present within the project.
31+
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
32+
- Check the pull requests tab to ensure that the feature isn't already in progress.
33+
34+
Before submitting a pull request:
35+
36+
- Check the codebase to ensure that your feature doesn't already exist.
37+
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38+
39+
## Requirements
40+
41+
If the project maintainer has any additional requirements, you will find them listed here.
42+
43+
- **[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).
44+
45+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
46+
47+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
48+
49+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
50+
51+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52+
53+
- **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.
54+
55+
**Happy coding**!

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) 2016 Spatie bvba <[email protected]>
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

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Very short description of the package
2+
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/:package_name.svg?style=flat-square)](https://packagist.org/packages/spatie/:package_name)
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/spatie/:package_name/master.svg?style=flat-square)](https://travis-ci.org/spatie/:package_name)
6+
[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/xxxxxxxxx.svg?style=flat-square)](https://insight.sensiolabs.com/projects/xxxxxxxxx)
7+
[![Quality Score](https://img.shields.io/scrutinizer/g/spatie/:package_name.svg?style=flat-square)](https://scrutinizer-ci.com/g/spatie/:package_name)
8+
[![Total Downloads](https://img.shields.io/packagist/dt/spatie/:package_name.svg?style=flat-square)](https://packagist.org/packages/spatie/:package_name)
9+
10+
**Note:** Replace ```:author_name``` ```:author_username``` ```:author_website``` ```:author_email``` ```:package_name``` ```:package_description``` with their correct values in [README.md](README.md), [CHANGELOG.md](CHANGELOG.md), [CONTRIBUTING.md](CONTRIBUTING.md), [LICENSE.md](LICENSE.md) and [composer.json](composer.json) files, 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 PSRs you support to avoid any confusion with users and contributors.
13+
14+
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).
15+
16+
## Installation
17+
18+
**Note:** Remove this paragraph if you are building a public package
19+
This package is custom built for [Spatie](https://spatie.be) projects and is therefore not registered on packagist. In order to install it via composer you must specify this extra repository in `composer.json`:
20+
21+
```json
22+
"repositories": [ { "type": "composer", "url": "https://satis.spatie.be/" } ]
23+
```
24+
25+
You can install the package via composer:
26+
27+
``` bash
28+
composer require spatie/:package_name
29+
```
30+
31+
## Usage
32+
33+
``` php
34+
$skeleton = new Spatie\Skeleton();
35+
echo $skeleton->echoPhrase('Hello, Spatie!');
36+
```
37+
38+
## Changelog
39+
40+
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
41+
42+
## Testing
43+
44+
``` bash
45+
$ composer test
46+
```
47+
48+
## Contributing
49+
50+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
51+
52+
## Security
53+
54+
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
55+
56+
## Credits
57+
58+
- [:author_name](https://github.com/:author_username)
59+
- [All Contributors](../../contributors)
60+
61+
## About Spatie
62+
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).
63+
64+
## License
65+
66+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "spatie/:package_name",
3+
"description": ":package_description",
4+
"keywords": [
5+
"spatie",
6+
":package_name"
7+
],
8+
"homepage": "https://github.com/spatie/:package_name",
9+
"license": "MIT",
10+
"authors": [
11+
{
12+
"name": ":author_name",
13+
"email": ":author_email",
14+
"homepage": "https://spatie.be",
15+
"role": "Developer"
16+
}
17+
],
18+
"require": {
19+
"php" : "^7.0"
20+
},
21+
"require-dev": {
22+
"phpunit/phpunit": "5.*"
23+
},
24+
"autoload": {
25+
"psr-4": {
26+
"Spatie\\Skeleton\\": "src"
27+
}
28+
},
29+
"autoload-dev": {
30+
"psr-4": {
31+
"Spatie\\Skeleton\\Test\\": "tests"
32+
}
33+
},
34+
"scripts": {
35+
"test": "vendor/bin/phpunit"
36+
}
37+
}

config/.gitkeep

Whitespace-only changes.

phpunit.xml.dist

+29
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="Spatie 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>

src/SkeletonClass.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace Spatie\Skeleton;
4+
5+
class SkeletonClass
6+
{
7+
/**
8+
* Create a new Skeleton Instance
9+
*/
10+
public function __construct()
11+
{
12+
// constructor body
13+
}
14+
15+
/**
16+
* Friendly welcome
17+
*
18+
* @param string $phrase Phrase to return
19+
*
20+
* @return string Returns the phrase passed in
21+
*/
22+
public function echoPhrase($phrase)
23+
{
24+
return $phrase;
25+
}
26+
}

src/SkeletonFacade.php

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Spatie\Skeleton;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
/**
8+
* @see \Spatie\Skeleton\SkeletonClass
9+
*/
10+
class SkeletonFacade extends Facade
11+
{
12+
/**
13+
* Get the registered name of the component.
14+
*
15+
* @return string
16+
*/
17+
protected static function getFacadeAccessor()
18+
{
19+
return 'skeleton';
20+
}
21+
}

src/SkeletonServiceProvider.php

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Spatie\Skeleton;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class SkeletonServiceProvider extends ServiceProvider
8+
{
9+
/**
10+
* Bootstrap the application services.
11+
*/
12+
public function boot()
13+
{
14+
$this->publishes([
15+
__DIR__.'/../config/skeleton.php' => config_path('skeleton.php'),
16+
], 'config');
17+
18+
/*
19+
$this->loadViewsFrom(__DIR__.'/../resources/views', 'skeleton');
20+
21+
$this->publishes([
22+
__DIR__.'/../resources/views' => base_path('resources/views/vendor/skeleton'),
23+
], 'views');
24+
*/
25+
}
26+
27+
/**
28+
* Register the application services.
29+
*/
30+
public function register()
31+
{
32+
$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'skeleton');
33+
}
34+
}

0 commit comments

Comments
 (0)