Download the PHP package 3f/lint without Composer
On this page you can find all versions of the php package 3f/lint. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package lint
Short Description Lint is a wrapper to `PHP -l` command.
License Apache-2.0
Homepage https://github.com/dedalozzo/lint
Informations about the package lint
Lint
Lint is a wrapper to php -l
command.
Composer Installation
To install Lint, you first need to install Composer, a Package Manager for PHP, following those few steps:
You can run this command to easily access composer from anywhere on your system:
Lint Installation
Once you have installed Composer, it's easy install Lint.
-
Edit your
composer.json
file, adding Lint to the require section: - Run the following command in your project root dir:
Usage
Lint provides two static methods only: checkSourceFile()
and checkSourceCode()
:
Methods
Lint::checkSourceFile()
Makes the syntax check of the specified file. If an error occurs, generates an exception.
Parameters
-
fileName
The file name you want check.
Exceptions
-
RuntimeException
In case of error it raises an exception.
Lint::checkSourceCode()
Makes the syntax check of the given source code. If an error occurs, generates an exception.
Parameters
-
str
The source code.
-
addTags
Tells if you want add PHP tags to the source code, because PHP lint needs them or it will raise an exception.
Exceptions
-
RuntimeException
In case of error it raises an exception.
Documentation
The documentation can be generated using Doxygen. A Doxyfile
is provided for your convenience.
Requirements
- PHP 5.4.0 or above.
Authors
Filippo F. Fadda - http://www.linkedin.com/in/filippofadda
License
Lint is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.