Need help with phpsa?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

ovr
652 Stars 46 Forks Other 1.6K Commits 62 Opened issues

Description

Smart/Static Analyzer(sis) for PHP :bowtie::neckbeard:

Services available

!
?

Need anything else?

Contributors list

# 6,569
Postgre...
athena
Apache ...
Rust
1121 commits
# 50,711
PHP
specifi...
busines...
Symfony
49 commits
# 153,108
Shell
HTML
PHP
scrum
13 commits
# 30,396
woocomm...
flex
php7
symfony...
12 commits
# 205,307
PHP
Shell
ast
11 commits
# 384,043
C++
PHP
eslint-...
eslint-...
10 commits
# 694,694
PHP
8 commits
# 626,775
PHP
7 commits
# 293,728
HTML
psr-7
PHP
Shell
5 commits
# 488,401
PHP
Shell
4 commits
# 183,653
PHP
pointer...
HTML
React
2 commits
# 39,342
PHP
Laravel
phpstor...
elm
2 commits
# 192,817
TeX
Laravel
adminlt...
PHP
2 commits
# 664,208
Python
PHP
2 commits
# 304,399
PHP
HTML
1 commit
# 8,902
macOS
Shell
macosx
Symfony
1 commit
# 26,982
PHP
Bootstr...
phpstor...
static-...
1 commit
# 771,126
PHP
1 commit
# 489,503
PHP
HTML
zend-fr...
twitter...
1 commit
# 199,859
PHP
C++
steam
PHPUnit
1 commit

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

  • [X] Core - Component containing definitions and other core files
  • [X] Compiler - Component to compile expression(s) and statement(s) from an abstract syntax tree
  • [X] Analyzer - Component doing various checks on your files
  • [X] 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 >= 7.0, but you can check files that use 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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.