Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ovr/phpsa
Smart/Static Analyzer(sis) for PHP :bowtie::neckbeard:
https://github.com/ovr/phpsa
analyzer control-flow php php-static-analysis phpsa
Last synced: about 1 month ago
JSON representation
Smart/Static Analyzer(sis) for PHP :bowtie::neckbeard:
- Host: GitHub
- URL: https://github.com/ovr/phpsa
- Owner: ovr
- License: other
- Archived: true
- Created: 2015-06-20T06:24:46.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-27T06:40:47.000Z (over 5 years ago)
- Last Synced: 2024-07-13T00:49:25.857Z (about 2 months ago)
- Topics: analyzer, control-flow, php, php-static-analysis, phpsa
- Language: PHP
- Homepage:
- Size: 1.69 MB
- Stars: 639
- Watchers: 33
- Forks: 77
- Open Issues: 62
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
![Logo](http://dmtry.me/img/logos/phpsa.png)
PHPSA - Smart Analyzer for PHP
===============================
[![Build Status](https://travis-ci.org/ovr/phpsa.svg?branch=master)](https://travis-ci.org/ovr/phpsa)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ovr/phpsa/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ovr/phpsa/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/ovr/phpsa/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/ovr/phpsa/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/ovr/phpsa/v/stable.svg)](https://packagist.org/packages/ovr/phpsa)
[![License](https://poser.pugx.org/ovr/phpsa/license.svg)](https://packagist.org/packages/ovr/phpsa)> 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)](/docs/01_Installation.md)
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.
``` json
{
"require": {
"ovr/phpsa": "*"
}
}
```### How to use [(more)](/docs/02_Usage.md)
```sh
$ ./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](/docs/) in case you need more information on some topic.
### Contributing
Check our [Contributing Guide](/.github/CONTRIBUTING.md) to see how you can help.
### Sponsors
Thanks to our sponsors and supporters:
### LICENSE
This project is open-sourced software licensed under the MIT License.
See the [LICENSE](LICENSE) file for more information.