2017 © Pedro Peláez
 

library lint

Lint is a wrapper to `PHP -l` command.

image

3f/lint

Lint is a wrapper to `PHP -l` command.

  • Wednesday, November 29, 2017
  • by dedalozzo
  • Repository
  • 1 Watchers
  • 4 Stars
  • 319 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Latest Stable Version Latest Unstable Version Build Status Scrutinizer Code Quality License Total Downloads, (*1)

Lint

Lint is a wrapper to php -l command., (*2)

Composer Installation

To install Lint, you first need to install Composer, a Package Manager for PHP, following those few steps:, (*3)

curl -s https://getcomposer.org/installer | php

You can run this command to easily access composer from anywhere on your system:, (*4)

sudo mv composer.phar /usr/local/bin/composer

Lint Installation

Once you have installed Composer, it's easy install Lint., (*5)

  1. Edit your composer.json file, adding Lint to the require section:
{
    "require": {
        "3f/lint": "dev-master"
    },
}
  1. Run the following command in your project root dir:
composer update

Usage

Lint provides two static methods only: checkSourceFile() and checkSourceCode():, (*6)

Lint::checkSourceFile("foo.php");

Methods

Lint::checkSourceFile()

public static function checkSourceFile(
    $fileName
)

Makes the syntax check of the specified file. If an error occurs, generates an exception., (*7)

Parameters, (*8)

  • fileName, (*9)

    The file name you want check., (*10)

Exceptions, (*11)

  • RuntimeException, (*12)

    In case of error it raises an exception., (*13)

Lint::checkSourceCode()

public static function checkSourceCode(
    $str,
    $addTags = TRUE
)

Makes the syntax check of the given source code. If an error occurs, generates an exception., (*14)

Parameters, (*15)

  • str, (*16)

    The source code., (*17)

  • addTags, (*18)

    Tells if you want add PHP tags to the source code, because PHP lint needs them or it will raise an exception., (*19)

Exceptions, (*20)

  • RuntimeException, (*21)

    In case of error it raises an exception., (*22)

Documentation

The documentation can be generated using Doxygen. A Doxyfile is provided for your convenience., (*23)

Requirements

  • PHP 5.4.0 or above.

Authors

Filippo F. Fadda - filippo.fadda@programmazione.it - http://www.linkedin.com/in/filippofadda, (*24)

License

Lint is licensed under the Apache License, Version 2.0 - see the LICENSE file for details., (*25)

The Versions

29/11 2017

dev-master

9999999-dev https://github.com/dedalozzo/lint

Lint is a wrapper to `PHP -l` command.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

29/11 2017

1.3.6

1.3.6.0 https://github.com/dedalozzo/lint

Lint is a wrapper to `PHP -l` command.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

24/04 2015

1.3.5

1.3.5.0 http://github.com/dedalozzo/Lint

Lint is a wrapper to 'PHP -l' command.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

20/01 2015

1.3.4

1.3.4.0 http://github.com/dedalozzo/Lint

Lint is a wrapper to 'PHP -l' command.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

21/12 2014

1.3.3

1.3.3.0 http://github.com/dedalozzo/Lint

Lint is a wrapper to 'PHP -l' command.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

26/06 2014

1.2.1

1.2.1.0 http://github.com/dedalozzo/Lint

Lint is a wrapper to 'PHP -l' command.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

26/06 2014

1.3.1

1.3.1.0 http://github.com/dedalozzo/Lint

Lint is a wrapper to 'PHP -l' command.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

26/06 2014

1.3

1.3.0.0 http://github.com/dedalozzo/Lint

Lint is a wrapper to 'PHP -l' command.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

30/05 2014

1.2

1.2.0.0 http://github.com/dedalozzo/Lint

Lint is a wrapper to 'PHP -l' command.

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

08/06 2013

1.1

1.1.0.0 http://github.com/dedalozzo/Lint

Lint is a wrapper to 'PHP -l' command.

  Sources   Download

Apache License 2.0

The Requires

  • php >=5.4.0

 

lint syntax checker

26/10 2012

1.0

1.0.0.0 http://github.com/dedalozzo/Lint

Lint is a wrapper to 'PHP -l' command.

  Sources   Download

Apache License 2.0

The Requires

  • php >=5.4.0

 

lint syntax checker