1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 10:17:33 +01:00
psalm/src/Psalm/Plugin.php
2017-11-07 14:46:53 -05:00

72 lines
2.0 KiB
PHP

<?php
namespace Psalm;
use PhpParser;
use Psalm\Checker\FileChecker;
use Psalm\Checker\StatementsChecker;
use Psalm\FileManipulation\FileManipulation;
use Psalm\Storage\ClassLikeStorage;
abstract class Plugin
{
/**
* Called after an expression has been checked
*
* @param StatementsChecker $statements_checker
* @param PhpParser\Node\Expr $stmt
* @param Context $context
* @param CodeLocation $code_location
* @param string[] $suppressed_issues
* @param FileManipulation[] $file_replacements
*
* @return null|false
*/
public function afterExpressionCheck(
StatementsChecker $statements_checker,
PhpParser\Node\Expr $stmt,
Context $context,
CodeLocation $code_location,
array $suppressed_issues,
array &$file_replacements = []
) {
return null;
}
/**
* Called after a statement has been checked
*
* @param StatementsChecker $statements_checker
* @param PhpParser\Node\Stmt|PhpParser\Node\Expr $stmt
* @param Context $context
* @param CodeLocation $code_location
* @param string[] $suppressed_issues
* @param FileManipulation[] $file_replacements
*
* @return null|false
*/
public function afterStatementCheck(
StatementsChecker $statements_checker,
PhpParser\Node $stmt,
Context $context,
CodeLocation $code_location,
array $suppressed_issues,
array &$file_replacements = []
) {
return null;
}
/**
* @param FileManipulation[] $file_replacements
*
* @return void
*/
public function visitClassLike(
PhpParser\Node\Stmt\ClassLike $stmt,
ClassLikeStorage $storage,
FileChecker $file_checker,
Aliases $aliases,
array &$file_replacements = []
) {
}
}