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