2016-06-18 14:45:55 -04:00
|
|
|
<?php
|
2016-07-25 18:37:44 -04:00
|
|
|
namespace Psalm;
|
2016-06-18 14:45:55 -04:00
|
|
|
|
|
|
|
use PhpParser;
|
2017-05-04 22:40:24 -04:00
|
|
|
use Psalm\Checker\ClassLikeChecker;
|
2017-01-02 15:31:18 -05:00
|
|
|
use Psalm\Checker\StatementsChecker;
|
2017-05-04 22:40:24 -04:00
|
|
|
use Psalm\Storage\ClassLikeStorage;
|
2016-06-18 14:45:55 -04:00
|
|
|
|
|
|
|
abstract class Plugin
|
|
|
|
{
|
|
|
|
/**
|
2016-11-02 02:29:00 -04:00
|
|
|
* Checks an expression
|
|
|
|
*
|
2017-01-02 15:31:18 -05:00
|
|
|
* @param StatementsChecker $statements_checker
|
2016-06-18 14:45:55 -04:00
|
|
|
* @param PhpParser\Node\Expr $stmt
|
2016-06-20 01:29:30 -04:00
|
|
|
* @param Context $context
|
2016-12-03 19:11:30 -05:00
|
|
|
* @param CodeLocation $code_location
|
2016-10-28 16:49:42 -04:00
|
|
|
* @param array $suppressed_issues
|
2017-05-26 20:16:18 -04:00
|
|
|
*
|
2016-06-18 14:45:55 -04:00
|
|
|
* @return null|false
|
|
|
|
*/
|
2017-01-02 15:31:18 -05:00
|
|
|
public function checkExpression(
|
|
|
|
StatementsChecker $statements_checker,
|
|
|
|
PhpParser\Node\Expr $stmt,
|
|
|
|
Context $context,
|
|
|
|
CodeLocation $code_location,
|
|
|
|
array $suppressed_issues
|
|
|
|
) {
|
2016-11-02 02:29:00 -04:00
|
|
|
return null;
|
2016-06-18 14:45:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-11-02 02:29:00 -04:00
|
|
|
* Checks a statement
|
|
|
|
*
|
2017-01-02 15:31:18 -05:00
|
|
|
* @param StatementsChecker $statements_checker
|
2016-12-12 13:50:46 -05:00
|
|
|
* @param PhpParser\Node\Stmt|PhpParser\Node\Expr $stmt
|
|
|
|
* @param Context $context
|
|
|
|
* @param CodeLocation $code_location
|
|
|
|
* @param array $suppressed_issues
|
2017-05-26 20:16:18 -04:00
|
|
|
*
|
2016-06-18 14:45:55 -04:00
|
|
|
* @return null|false
|
|
|
|
*/
|
2017-01-02 15:31:18 -05:00
|
|
|
public function checkStatement(
|
|
|
|
StatementsChecker $statements_checker,
|
|
|
|
PhpParser\Node $stmt,
|
|
|
|
Context $context,
|
|
|
|
CodeLocation $code_location,
|
|
|
|
array $suppressed_issues
|
|
|
|
) {
|
2016-11-02 02:29:00 -04:00
|
|
|
return null;
|
2016-06-18 14:45:55 -04:00
|
|
|
}
|
2017-05-04 22:40:24 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param ClassLikeChecker $statements_checker
|
|
|
|
* @param ClassLikeStorage $storage
|
2017-05-05 00:06:46 -04:00
|
|
|
* @param PhpParser\Node\Stmt\ClassLike $stmt
|
2017-05-04 22:40:24 -04:00
|
|
|
* @param CodeLocation $code_location
|
2017-05-26 20:16:18 -04:00
|
|
|
*
|
2017-05-04 22:40:24 -04:00
|
|
|
* @return null|false
|
|
|
|
*/
|
|
|
|
public function visitClassLike(
|
|
|
|
ClassLikeChecker $statements_checker,
|
2017-05-05 00:06:46 -04:00
|
|
|
PhpParser\Node\Stmt\ClassLike $stmt,
|
2017-05-04 22:40:24 -04:00
|
|
|
ClassLikeStorage $storage,
|
|
|
|
CodeLocation $code_location
|
|
|
|
) {
|
|
|
|
return null;
|
|
|
|
}
|
2016-06-18 14:45:55 -04:00
|
|
|
}
|