Git Product home page Git Product logo

phpsa's Introduction

Logo

PHPSA - Smart Analyzer for PHP

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

PHPSA is a development tool aimed at bringing complex analysis for PHP applications and libraries.

P.S This software is currently in early alpha state, any contributions/stars will be awesome.

Components

  • Core - Component containing definitions and other core files
  • Compiler - Component to compile expression(s) and statement(s) from an abstract syntax tree
  • Analyzer - Component doing various checks on your files
  • ControlFlow - Component for ControlFlow (WIP)

Installation (more)

The recommended way to install phpsa is via Composer.

Run php composer.phar require ovr/phpsa or add a new requirement in your composer.json.

{
  "require": {
    "ovr/phpsa": "*"
  }
}

How to use (more)

$ ./bin/phpsa check fixtures/

Syntax error:  Syntax error, unexpected T_RETURN on line 11 in fixtures/simple/syntax/Error2.php 

    $b = $a + 1; 123123

Notice:  Constant BBBB does not exist in self scope in fixtures/simple/undefined/Const.php on 29 [undefined-const]

    return self::BBBB; 

Notice:  You are trying to cast 'string' to 'string' in fixtures/simple/code-smell/StandardFunctionCall.php on 16 [stupid.cast]

    return (string) json_encode(array(

Notice:  Missing docblock for callStaticMethodBySelf() method in fixtures/Compiling/Expression/StaticCall.php on 18 [missing-docblock]

    public static function callStaticMethodBySelf()

Requirements

PHP >= 5.6 (compatible up to version 7.1 && hhvm), but you can check files for PHP >= 5.2 with this.

Documentation

See our documentation in case you need more information on some topic.

Contributing

Check our Contributing Guide to see how you can help.

Sponsors

Thanks to our sponsors and supporters:

JetBrains

LICENSE

This project is open-sourced software licensed under the MIT License.

See the LICENSE file for more information.

phpsa's People

Contributors

ovr avatar k-phoen avatar scrutinizer-auto-fixer avatar algo13 avatar nikhilsaldanha avatar chasingsublimity avatar lexty avatar barroca avatar ufocoder avatar tomzx avatar om3rcitak avatar lex111 avatar hanzi avatar dmaicher avatar deepvyas avatar emanueleminotto avatar ksheps avatar veloxy avatar avelokke avatar ravage84 avatar msjyoo avatar micheleorselli avatar necromant2005 avatar sidroberts avatar yuxiangdai avatar alhimik45 avatar dailymatters avatar nikolaykovenko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.