Skip to content

Commit 6452c90

Browse files
committed
Create project structure
0 parents  commit 6452c90

File tree

9 files changed

+156
-0
lines changed

9 files changed

+156
-0
lines changed

.docheader

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* This file is part of Respect/Stringifier.
3+
*
4+
* (c) Henrique Moody <[email protected]>
5+
*
6+
* For the full copyright and license information, please view the "LICENSE.md"
7+
* file that was distributed with this source code.
8+
*/

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.* export-ignore
2+
/phpunit.xml.dist export-ignore
3+
/tests export-ignore

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.php_cs.cache
2+
.couscous/
3+
composer.lock
4+
Makefile
5+
phpunit.xml
6+
vendor/

.php_cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
return PhpCsFixer\Config::create()
4+
->setRiskyAllowed(true)
5+
->setRules([
6+
'@Symfony' => true,
7+
'@PHP71Migration:risky' => true,
8+
'phpdoc_align' => false,
9+
'phpdoc_summary' => false,
10+
'mb_str_functions' => true,
11+
'no_multiline_whitespace_before_semicolons' => true,
12+
'no_useless_else' => true,
13+
'no_useless_return' => true,
14+
'ordered_imports' => true,
15+
'phpdoc_order' => true,
16+
'array_syntax' => ['syntax' => 'short'],
17+
'no_short_echo_tag' => true,
18+
])
19+
->setFinder(
20+
PhpCsFixer\Finder::create()
21+
->in(['library', 'tests'])
22+
->name('*.php')
23+
->name('*.phpt')
24+
);

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
sudo: false
2+
3+
language: php
4+
5+
cache:
6+
directories:
7+
- $HOME/.composer/cache
8+
9+
matrix:
10+
include:
11+
- php: 7.1
12+
env: COMPOSER_ARGUMENTS="--prefer-lowest --prefer-stable"
13+
- php: 7.1
14+
- php: 7.2
15+
- php: nightly
16+
allow_failures:
17+
- php: nightly
18+
fast_finish: true
19+
20+
before_script:
21+
- composer update --prefer-dist ${COMPOSER_ARGUMENTS}
22+
23+
script:
24+
- vendor/bin/phpunit --colors --coverage-clover=test.clover
25+
- |
26+
if [[ "${TRAVIS_PHP_VERSION}" == "7.1" ]]; then
27+
vendor/bin/docheader check src/ tests/
28+
fi
29+
30+
after_script:
31+
- |
32+
if [[ "${TRAVIS_PHP_VERSION}" == "7.1" ]]; then
33+
wget https://scrutinizer-ci.com/ocular.phar
34+
php ocular.phar code-coverage:upload --format=php-clover test.clover
35+
fi

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# License
2+
3+
Copyright (c) [Henrique Moody](http://github.com/henriquemoody).
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 furnished
10+
to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Respect\Stringifier

composer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "respect/stringifier",
3+
"description": "Converts any value to a string",
4+
"keywords": ["respect", "stringifier", "stringify"],
5+
"type": "library",
6+
"homepage": "http://respect.github.io/Stringifier/",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "Respect/Stringifier Contributors",
11+
"homepage": "https://github.com/Respect/Stringifier/graphs/contributors"
12+
}
13+
],
14+
"require": {
15+
"php": ">=7.1"
16+
},
17+
"require-dev": {
18+
"friendsofphp/php-cs-fixer": "^2.8",
19+
"malukenho/docheader": "^0.1.7",
20+
"phpunit/phpunit": "^6.4"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"Respect\\Stringifier\\": "src/"
25+
}
26+
},
27+
"scripts": {
28+
"docheader": "vendor/bin/docheader check src/ tests/",
29+
"test": "vendor/bin/phpunit",
30+
"test-unit": "vendor/bin/phpunit --testsuite=unit",
31+
"test-integration": "vendor/bin/phpunit --testsuite=integration"
32+
}
33+
}

phpunit.xml.dist

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<phpunit bootstrap="vendor/autoload.php"
2+
backupGlobals="false"
3+
backupStaticAttributes="false"
4+
cacheTokens="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
processIsolation="false"
9+
stopOnFailure="false"
10+
syntaxCheck="false"
11+
verbose="false">
12+
<testsuites>
13+
<testsuite name="unit">
14+
<directory suffix="Test.php">tests/unit/</directory>
15+
</testsuite>
16+
<testsuite name="integration">
17+
<directory suffix=".phpt">tests/integration/</directory>
18+
</testsuite>
19+
</testsuites>
20+
<filter>
21+
<whitelist processUncoveredFilesFromWhitelist="true">
22+
<directory>src/</directory>
23+
</whitelist>
24+
</filter>
25+
</phpunit>

0 commit comments

Comments
 (0)