1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
psalm/bin/max_used_shortcode.php
2021-01-31 11:50:55 -05:00

18 lines
414 B
PHP
Executable File

#!/usr/bin/env php
<?php
require_once(dirname(__DIR__) . '/vendor/autoload.php');
$issue_types = \Psalm\Config\IssueHandler::getAllIssueTypes();
$shortcodes = array_map(
function ($issue_type): int {
$issue_class = '\\Psalm\\Issue\\' . $issue_type;
/** @var int */
return $issue_class::SHORTCODE;
},
$issue_types
);
echo 'Max used shortcode: ' . max($shortcodes) . PHP_EOL;