Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nilportugues/php-forbidden-functions

[Git hook] Command line to look for functions that should be avoided
https://github.com/nilportugues/php-forbidden-functions

ci composer forbidden-functions git git-hook git-hooks php php7 quality quality-assurance

Last synced: 26 days ago
JSON representation

[Git hook] Command line to look for functions that should be avoided

Awesome Lists containing this project

README

        

# PHP Forbidden Functions

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nilportugues/php_forbidden_functions/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nilportugues/php_forbidden_functions/?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/ba34c91a-4ee4-4b0d-8c7c-8ad3019a6fcc/mini.png)](https://insight.sensiolabs.com/projects/ba34c91a-4ee4-4b0d-8c7c-8ad3019a6fcc) [![Latest Stable Version](https://poser.pugx.org/nilportugues/php_forbidden/v/stable)](https://packagist.org/packages/nilportugues/php_forbidden) [![Total Downloads](https://poser.pugx.org/nilportugues/php_forbidden/downloads)](https://packagist.org/packages/nilportugues/php_forbidden) [![License](https://poser.pugx.org/nilportugues/php_forbidden/license)](https://packagist.org/packages/nilportugues/php_forbidden)
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://paypal.me/nilportugues)

Why? Because someone should look for forbidden functions that should be avoided in production.

Typical examples are `print_r`, `var_dump`, `exit` and `die` function calls.

## Installation

Use [Composer](https://getcomposer.org) to install the package:

```
$ composer require --dev nilportugues/php_forbidden
```

## Usage

It is really this simple:

```
$ php bin/php_forbidden check
```

```
$ php bin/php_forbidden check
```

You can also pipe STDIN in, if you want to use this tool with Gulp for instance:

```
$ cat | php bin/php_forbidden check
```

which means that this also works writing code directly from the shell (if you have some reason to do it):

```
$ php bin/php_forbidden check

- Opening an [Issue](https://github.com/nilportugues/php_forbidden_functions/issues/new)

## Authors

* [Nil Portugués Calderó](http://nilportugues.com)
* [The Community Contributors](https://github.com/nilportugues/php_forbidden_functions/graphs/contributors)

## License
The code base is licensed under the [MIT license](LICENSE).