-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6dc2aac
Showing
15 changed files
with
4,117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
* text=auto eol=lf | ||
|
||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.idea/ export-ignore | ||
.php_cs export-ignore | ||
.scrutinizer.yml export-ignore | ||
.travis.yml export-ignore | ||
.travis/ export-ignore | ||
CHANGELOG.md export-ignore | ||
composer.lock export-ignore | ||
phpunit.xml export-ignore | ||
README.md export-ignore | ||
tests/ export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/vendor/ | ||
/.php_cs.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__); | ||
|
||
$header = <<<TXT | ||
RQuadling/ClassFileConversion | ||
LICENSE | ||
This is free and unencumbered software released into the public domain. | ||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or | ||
as a compiled binary, for any purpose, commercial or non-commercial, and by any means. | ||
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright | ||
interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the | ||
detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of | ||
all present and future rights to this software under copyright law. | ||
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 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. | ||
For more information, please refer to <https://unlicense.org> | ||
TXT; | ||
|
||
$rules = [ | ||
'@PSR2' => true, | ||
'@Symfony' => true, | ||
'cast_spaces' => [ | ||
'space' => 'none', | ||
], | ||
'concat_space' => [ | ||
'spacing' => 'none', | ||
], | ||
'native_function_invocation' => [ | ||
'scope' => 'namespaced', | ||
], | ||
'psr4' => true, | ||
'phpdoc_align' => [ | ||
'align' => 'left', | ||
], | ||
'array_syntax' => [ | ||
'syntax' => 'short', | ||
], | ||
'header_comment' => [ | ||
'header' => $header, | ||
'commentType' => PhpCsFixer\Fixer\Comment\HeaderCommentFixer::HEADER_PHPDOC, | ||
], | ||
'yoda_style' => false, | ||
]; | ||
|
||
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules($rules) | ||
->setFinder($finder) | ||
->setCacheFile($cacheDir . '/.php_cs.cache'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tools: | ||
external_code_coverage: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
language: php | ||
sudo: false | ||
|
||
git: | ||
depth: 2 | ||
|
||
matrix: | ||
include: | ||
- php: 7.0 | ||
env: | ||
- LINT=true COVERAGE=true | ||
- php: 7.1 | ||
- php: 7.2 | ||
- php: 7.3 | ||
- php: 7.4 | ||
- php: nightly | ||
- php: hhvm-3.9 | ||
sudo: required | ||
dist: trusty | ||
group: edge | ||
|
||
fast_finish: true | ||
allow_failures: | ||
- php: nightly | ||
- php: hhvm-3.9 | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
- $HOME/.php-cs-fixer | ||
|
||
before_install: | ||
- source .travis/xdebug.sh | ||
- xdebug-disable | ||
|
||
before_script: | ||
- travis_retry composer update --no-interaction --prefer-source --prefer-stable | ||
|
||
script: | ||
- if [[ "$LINT" == "true" ]]; then | ||
composer cs-lint; | ||
composer sa; | ||
fi | ||
- if [[ "$COVERAGE" == "true" ]]; then | ||
xdebug-enable; | ||
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; | ||
xdebug-disable; | ||
else | ||
vendor/bin/phpunit; | ||
fi | ||
|
||
after_script: | ||
- if [[ "$COVERAGE" == "true" ]]; then | ||
wget https://scrutinizer-ci.com/ocular.phar; | ||
php ocular.phar code-coverage:upload --format=php-clover coverage.clover; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The problem is that we do not want to remove the configuration file, just disable it for a few tasks, then enable it | ||
# | ||
# For reference, see | ||
# | ||
# - https://docs.travis-ci.com/user/languages/php#Disabling-preinstalled-PHP-extensions | ||
# - https://docs.travis-ci.com/user/languages/php#Custom-PHP-configuration | ||
|
||
config="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini" | ||
|
||
function xdebug-disable() { | ||
if [[ -f $config ]]; then | ||
mv $config "$config.bak" | ||
fi | ||
} | ||
|
||
function xdebug-enable() { | ||
if [[ -f "$config.bak" ]]; then | ||
mv "$config.bak" $config | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
|
||
## 1.0.0 - 2019-12-27 - Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or | ||
as a compiled binary, for any purpose, commercial or non-commercial, and by any means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright | ||
interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the | ||
detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of | ||
all present and future rights to this software under copyright law. | ||
|
||
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 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. | ||
|
||
For more information, please refer to <https://unlicense.org> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RQuadling/ClassFileConversion | ||
|
||
[![Build Status](https://img.shields.io/travis/rquadling/class-file-conversion.svg?style=for-the-badge&logo=travis)](https://travis-ci.org/rquadling/class-file-conversion) | ||
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/rquadling/class-file-conversion.svg?style=for-the-badge&logo=scrutinizer)](https://scrutinizer-ci.com/g/rquadling/class-file-conversion/) | ||
[![GitHub issues](https://img.shields.io/github/issues/rquadling/class-file-conversion.svg?style=for-the-badge&logo=github)](https://github.com/rquadling/class-file-conversion/issues) | ||
|
||
[![PHP Version](https://img.shields.io/packagist/php-v/rquadling/class-file-conversion.svg?style=for-the-badge)](https://github.com/rquadling/class-file-conversion) | ||
[![Stable Version](https://img.shields.io/packagist/v/rquadling/class-file-conversion.svg?style=for-the-badge&label=Latest)](https://packagist.org/packages/rquadling/class-file-conversion) | ||
|
||
[![Total Downloads](https://img.shields.io/packagist/dt/rquadling/class-file-conversion.svg?style=for-the-badge&label=Total+downloads)](https://packagist.org/packages/rquadling/class-file-conversion) | ||
[![Monthly Downloads](https://img.shields.io/packagist/dm/rquadling/class-file-conversion.svg?style=for-the-badge&label=Monthly+downloads)](https://packagist.org/packages/rquadling/class-file-conversion) | ||
[![Daily Downloads](https://img.shields.io/packagist/dd/rquadling/class-file-conversion.svg?style=for-the-badge&label=Daily+downloads)](https://packagist.org/packages/rquadling/class-file-conversion) | ||
|
||
A wrapper for Phpactor for use within RQuadling's projects | ||
|
||
## Installation | ||
|
||
Using Composer: | ||
|
||
```sh | ||
composer require rquadling/class-file-conversion | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "rquadling/class-file-conversion", | ||
"description": "A wrapper for Phpactor for use within RQuadling's projects", | ||
"authors": [ | ||
{ | ||
"name": "Richard Quadling", | ||
"email": "RQuadling@GMail.com" | ||
} | ||
], | ||
"require": { | ||
"php": "^7", | ||
"phpactor/class-to-file": "^0.3.1" | ||
}, | ||
"require-dev": { | ||
"friendsofphp/php-cs-fixer": "^2.16", | ||
"phpstan/phpstan": "^0.9.2", | ||
"phpunit/phpunit": "^6.5", | ||
"rquadling/environment": "^1.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"RQuadling\\ClassFileConversion\\": "lib/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"RQuadlingTests\\ClassFileConversion\\": "tests/" | ||
} | ||
}, | ||
"scripts": { | ||
"cs-lint": "php-cs-fixer fix --diff -vvv --dry-run", | ||
"cs-fix": "php-cs-fixer fix . -vvv || true", | ||
"sa": "vendor/bin/phpstan analyse --no-progress --ansi -l 7 lib tests" | ||
} | ||
} |
Oops, something went wrong.