PHP Magic Number Detector

(( gitHubWatchers )) (( gitHubStars )) (( gitHubForks ))

PHP Magic Number Detector aims to help you to detect magic numbers in your PHP code.

A magic number is a numeric literal that is not defined as a constant, but which may change at a later stage, and therefore can be hard to update. It's considered a bad programming practice to use numbers directly in any source code without an explanation. In most cases this makes programs harder to read, understand, and maintain.

By default 0 and 1 are not considered to be magic numbers.

Installation

Install from a Composer package as a dev dependency (with Composer)

Make sure you have Composer installed.

Require it as a dev dependency:
composer require --dev povils/phpmnd
Run it:
php vendor/bin/phpmnd