1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-06 05:29:00 +01:00
psalm/bin/max_used_shortcode.php

22 lines
459 B
PHP
Raw Normal View History

#!/usr/bin/env php
<?php
2023-10-19 13:12:06 +02:00
declare(strict_types=1);
2021-12-03 20:11:20 +01:00
use Psalm\Config\IssueHandler;
require_once(dirname(__DIR__) . '/vendor/autoload.php');
2021-12-03 20:11:20 +01:00
$issue_types = IssueHandler::getAllIssueTypes();
$shortcodes = array_map(
function ($issue_type): int {
$issue_class = '\\Psalm\\Issue\\' . $issue_type;
/** @var int */
return $issue_class::SHORTCODE;
},
2022-12-18 17:15:15 +01:00
$issue_types,
);
echo 'Max used shortcode: ' . max($shortcodes) . PHP_EOL;