From 22d8f5a0bcc99d326d91125e52af67516cb524e5 Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Sun, 16 Aug 2020 23:26:54 +0300 Subject: [PATCH] Fixed duplicate shortcodes (#3996) Also added an utility to help assign new shortcodes and a test to prevent duplicate shortcodes. --- bin/max_used_shortcode.php | 16 +++++++++++++++ src/Psalm/Issue/InvalidExtendClass.php | 2 +- tests/DocumentationTest.php | 28 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 bin/max_used_shortcode.php diff --git a/bin/max_used_shortcode.php b/bin/max_used_shortcode.php new file mode 100644 index 000000000..cc15b7d72 --- /dev/null +++ b/bin/max_used_shortcode.php @@ -0,0 +1,16 @@ + 1; + } + ); + + $this->assertEquals( + [], + $duplicate_shortcodes, + "Duplicate shortcodes found: \n" . var_export($duplicate_shortcodes, true) + ); + } }