-
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 567d8d0
Showing
29 changed files
with
1,881 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,2 @@ | ||
coverage_clover: tests/log/clover.xml | ||
json_path: tests/log/coveralls-upload.json |
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,8 @@ | ||
tests export-ignore | ||
.coveralls.yml export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
.composer.lock export-ignore | ||
phpcs.xml export-ignore | ||
pre-commit 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,16 @@ | ||
._* | ||
.~lock.* | ||
*.log | ||
.buildpath | ||
.DS_Store | ||
.idea | ||
.project | ||
.settings | ||
build | ||
log | ||
cache | ||
vendor | ||
composer.phar | ||
nbproject | ||
node_modules | ||
!.gitignore |
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,15 @@ | ||
language: php | ||
php: | ||
- 7.1 | ||
before_install: | ||
- composer self-update | ||
install: | ||
- composer install --no-interaction --prefer-source | ||
- composer require php-coveralls/php-coveralls | ||
script: | ||
- composer build | ||
after_failure: | ||
# Prints tests *.actual files content | ||
- for i in $(find ./tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done | ||
after_success: | ||
- travis_retry php vendor/bin/php-coveralls -v |
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,27 @@ | ||
Copyright (c) 2019, Webino, s. r. o. (https://webino.sk), | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
- Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
- Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
- Neither the name of Webino nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,75 @@ | ||
# Webino Exceptions | ||
|
||
Slightly better exceptions. | ||
|
||
[![Build Status](https://img.shields.io/travis/webino/exceptions/master.svg?style=for-the-badge)](http://travis-ci.org/webino/exceptions "Master Build Status") | ||
[![Coverage Status](https://img.shields.io/coveralls/github/webino/exceptions/master.svg?style=for-the-badge)](https://coveralls.io/github/webino/exceptions?branch=master "Master Coverage Status") | ||
[![Code Quality](https://img.shields.io/scrutinizer/g/webino/exceptions/master.svg?style=for-the-badge)](https://scrutinizer-ci.com/g/webino/exceptions/?branch=master "Master Code Quality") | ||
[![Latest Stable Version](https://img.shields.io/github/tag/webino/exceptions.svg?label=STABLE&style=for-the-badge)](https://packagist.org/packages/webino/exceptions) | ||
|
||
|
||
## Setup | ||
[![PHP from Packagist](https://img.shields.io/packagist/php-v/webino/exceptions.svg?style=for-the-badge)](https://php.net "Required PHP version") | ||
|
||
```bash | ||
composer require webino\exceptions | ||
``` | ||
|
||
|
||
## Quick Use | ||
|
||
Exception message formatting: | ||
```php | ||
$exc = (new Exception('Exception %s, %s.'))->format($foo, $bar); | ||
echo $exc->getMessage(); | ||
|
||
// => Exception `Foo`, `Bar`. | ||
``` | ||
|
||
|
||
## Development | ||
|
||
[![Build Status](https://img.shields.io/travis/webino/exceptions/develop.svg?style=for-the-badge)](http://travis-ci.org/webino/exceptions "Develop Build Status") | ||
[![Coverage Status](https://img.shields.io/coveralls/github/webino/exceptions/develop.svg?style=for-the-badge)](https://coveralls.io/github/webino/exceptions?branch=develop "Develop Coverage Status") | ||
[![Code Quality](https://img.shields.io/scrutinizer/g/webino/exceptions/develop.svg?style=for-the-badge)](https://scrutinizer-ci.com/g/webino/exceptions/?branch=develop "Develop Code Quality") | ||
[![Latest Unstable Version](https://img.shields.io/github/tag-pre/webino/exceptions.svg?label=PREVIEW&style=for-the-badge)](https://packagist.org/packages/webino/exceptions "Packagist") | ||
|
||
|
||
Static analysis: | ||
```bash | ||
composer analyse | ||
``` | ||
|
||
Coding style check: | ||
```bash | ||
composer check | ||
``` | ||
|
||
Coding style fix: | ||
```bash | ||
composer fix | ||
``` | ||
|
||
Testing: | ||
```bash | ||
composer test | ||
``` | ||
|
||
Git pre-commit setup: | ||
```bash | ||
ln -s ../../pre-commit .git/hooks/pre-commit | ||
``` | ||
|
||
|
||
## Addendum | ||
|
||
[![License](https://img.shields.io/packagist/l/webino/exceptions.svg?style=for-the-badge)](https://github.com/webino/exceptions/blob/master/LICENSE.md "BSD-3-Clause License") | ||
[![Total Downloads](https://img.shields.io/packagist/dt/webino/exceptions.svg?style=for-the-badge)](https://packagist.org/packages/webino/exceptions "Packagist") | ||
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/webino/exceptions.svg?style=for-the-badge) | ||
|
||
|
||
Please, if you are interested in this library report any issues and don't hesitate to contribute. | ||
We will appreciate any contributions on development of this library. | ||
|
||
[![GitHub issues](https://img.shields.io/github/issues/webino/exceptions.svg?style=for-the-badge)](https://github.com/webino/exceptions/issues) | ||
[![GitHub forks](https://img.shields.io/github/forks/webino/exceptions.svg?label=Fork&style=for-the-badge)](https://github.com/webino/exceptions) |
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,53 @@ | ||
{ | ||
"name": "webino/exceptions", | ||
"description": "Slightly better PHP exceptions.", | ||
"type": "library", | ||
"license": "BSD-3-Clause", | ||
"authors": [ | ||
{ | ||
"name": "Peter Bacinsky", | ||
"email": "peter@bacinsky.sk" | ||
} | ||
], | ||
"require": { | ||
"php": "~7.1" | ||
}, | ||
"require-dev": { | ||
"tracy/tracy": "2.*", | ||
"nette/tester": "1.*", | ||
"phpstan/phpstan": "0.*", | ||
"squizlabs/php_codesniffer": "3.*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Webino\\": [ | ||
"src" | ||
] | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Webino\\": [ | ||
"tests/src" | ||
] | ||
} | ||
}, | ||
"scripts": { | ||
"check": "vendor/bin/phpcs --extensions=php,phpt", | ||
"fix": "vendor/bin/phpcbf --extensions=php,phpt", | ||
"analyse": "vendor/bin/phpstan analyse src --level max", | ||
"test": "vendor/bin/tester -c tests/php.ini -d auto_prepend_file=$PWD/tests/bootstrap.php -l tests/log/test.log --coverage tests/log/clover.xml --coverage-src src", | ||
"build": [ | ||
"@check", | ||
"@analyse", | ||
"@composer test tests" | ||
] | ||
}, | ||
"scripts-descriptions": { | ||
"check": "Coding style check.", | ||
"fix": "Coding style fix.", | ||
"analyse": "Static analysis.", | ||
"test": "Run tests.", | ||
"build": "Automated build." | ||
} | ||
} |
Oops, something went wrong.