1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 17:27:28 +01:00
psalm/bin/max_used_shortcode.php
Bruce Weirdan 22d8f5a0bc
Fixed duplicate shortcodes (#3996)
Also added an utility to help assign new shortcodes and a test to
prevent duplicate shortcodes.
2020-08-16 16:26:54 -04:00

17 lines
395 B
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;