Page MenuHomeWickedGov Phorge

IssueFixingPlugin.php
No OneTemporary

Size
941 B
Referenced Files
None
Subscribers
None

IssueFixingPlugin.php

<?php
declare(strict_types=1);
namespace Phan\Plugin\Internal;
use Error;
use Phan\CodeBase;
use Phan\Phan;
use Phan\Plugin\Internal\IssueFixingPlugin\IssueFixer;
use Phan\PluginV3;
use Phan\PluginV3\FinalizeProcessCapability;
/**
* This plugin fixes a small number of issues automatically.
* This uses heuristics to guess where the fix should be applied.
*/
class IssueFixingPlugin extends PluginV3 implements
FinalizeProcessCapability
{
/**
* @override
* @throws Error if a syntax check process fails to shut down.
*/
public function finalizeProcess(CodeBase $code_base): void
{
$instances = Phan::getIssueCollector()->getCollectedIssues();
if (\count($instances) > 0) {
IssueFixer::applyFixes($code_base, $instances);
}
}
}
// Every plugin needs to return an instance of itself at the
// end of the file in which it's defined.
return new IssueFixingPlugin();

File Metadata

Mime Type
text/x-php
Expires
Mon, Nov 23, 19:33 (6 d, 23 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
00/d6/6b1ad7e85d72fbf50e705b3e8894
Default Alt Text
IssueFixingPlugin.php (941 B)

Event Timeline