Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bacinsky committed Jun 22, 2019
0 parents commit 767d5e2
Show file tree
Hide file tree
Showing 28 changed files with 1,990 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
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
8 changes: 8 additions & 0 deletions .gitattributes
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
16 changes: 16 additions & 0 deletions .gitignore
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
15 changes: 15 additions & 0 deletions .travis.yml
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
27 changes: 27 additions & 0 deletions LICENSE.md
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.
104 changes: 104 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Webino Develop

Developer utilities.

[![Build Status](https://img.shields.io/travis/webino/develop/master.svg?style=for-the-badge)](http://travis-ci.org/webino/develop "Master Build Status")
[![Coverage Status](https://img.shields.io/coveralls/github/webino/develop/master.svg?style=for-the-badge)](https://coveralls.io/github/webino/develop?branch=master "Master Coverage Status")
[![Code Quality](https://img.shields.io/scrutinizer/g/webino/develop/master.svg?style=for-the-badge)](https://scrutinizer-ci.com/g/webino/develop/?branch=master "Master Code Quality")
[![Latest Stable Version](https://img.shields.io/github/tag/webino/develop.svg?label=STABLE&style=for-the-badge)](https://packagist.org/packages/webino/develop)

## Recommended Usage

Do use utility functions only for development usage.


## Setup
[![PHP from Packagist](https://img.shields.io/packagist/php-v/webino/develop.svg?style=for-the-badge)](https://php.net "Required PHP version")

```bash
composer require webino\develop
```


## Quick Use

Utility functions, development only:
```php
d($foo); // var_dump();
dd($foo); // var_dump();exit;
p($foo); // print_r();
pd($foo); // print_r();exit;
pr($foo); // return print_r();
e(); // throw new \Webino\DevException;
```

## API

- *void* d(*mixed* $subject) <br>
Var dumping the subject.

- *void* d(*mixed* $subject) <br>
Dying var dumping the subject.

- *void* p(*mixed* $subject) <br>
Enhanced subject print scream.

- *void* pd(*mixed* $subject) <br>
Dying enhanced subject print scream.

- *string* pr(*mixed* $subject) <br>
Enhanced subject print return.

- *void* bd(*mixed* $subject) <br>
Debugger bar var dumping the subject.

- *void* e(*string* $msg = '') <br>
Development exception.


## Development

[![Build Status](https://img.shields.io/travis/webino/develop/develop.svg?style=for-the-badge)](http://travis-ci.org/webino/develop "Develop Build Status")
[![Coverage Status](https://img.shields.io/coveralls/github/webino/develop/develop.svg?style=for-the-badge)](https://coveralls.io/github/webino/develop?branch=develop "Develop Coverage Status")
[![Code Quality](https://img.shields.io/scrutinizer/g/webino/develop/develop.svg?style=for-the-badge)](https://scrutinizer-ci.com/g/webino/develop/?branch=develop "Develop Code Quality")
[![Latest Unstable Version](https://img.shields.io/github/tag-pre/webino/develop.svg?label=PREVIEW&style=for-the-badge)](https://packagist.org/packages/webino/develop "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/develop.svg?style=for-the-badge)](https://github.com/webino/develop/blob/master/LICENSE.md "BSD-3-Clause License")
[![Total Downloads](https://img.shields.io/packagist/dt/webino/develop.svg?style=for-the-badge)](https://packagist.org/packages/webino/develop "Packagist")
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/webino/develop.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/develop.svg?style=for-the-badge)](https://github.com/webino/develop/issues)
[![GitHub forks](https://img.shields.io/github/forks/webino/develop.svg?label=Fork&style=for-the-badge)](https://github.com/webino/develop)
59 changes: 59 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "webino/develop",
"description": "PHP applications development support.",
"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"
]
},
"files": [
"src/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"Webino\\": [
"tests/src"
]
}
},
"suggest": {
"tracy/tracy": "Better debug."
},
"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."
}
}

0 comments on commit 767d5e2

Please sign in to comment.