Completed
Branch dev (a3ade4)
by
unknown
10:45
created
vendor/squizlabs/php_codesniffer/src/Generators/Generator.php 1 patch
Indentation   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -19,100 +19,100 @@
 block discarded – undo
19 19
 abstract class Generator
20 20
 {
21 21
 
22
-    /**
23
-     * The ruleset used for the run.
24
-     *
25
-     * @var \PHP_CodeSniffer\Ruleset
26
-     */
27
-    public $ruleset = null;
28
-
29
-    /**
30
-     * XML documentation files used to produce the final output.
31
-     *
32
-     * @var string[]
33
-     */
34
-    public $docFiles = [];
35
-
36
-
37
-    /**
38
-     * Constructs a doc generator.
39
-     *
40
-     * @param \PHP_CodeSniffer\Ruleset $ruleset The ruleset used for the run.
41
-     *
42
-     * @see generate()
43
-     */
44
-    public function __construct(Ruleset $ruleset)
45
-    {
46
-        $this->ruleset = $ruleset;
47
-
48
-        foreach ($ruleset->sniffs as $className => $sniffClass) {
49
-            $file    = Autoload::getLoadedFileName($className);
50
-            $docFile = str_replace(
51
-                DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR,
52
-                DIRECTORY_SEPARATOR.'Docs'.DIRECTORY_SEPARATOR,
53
-                $file
54
-            );
55
-            $docFile = str_replace('Sniff.php', 'Standard.xml', $docFile);
56
-
57
-            if (is_file($docFile) === true) {
58
-                $this->docFiles[] = $docFile;
59
-            }
60
-        }
61
-
62
-    }//end __construct()
63
-
64
-
65
-    /**
66
-     * Retrieves the title of the sniff from the DOMNode supplied.
67
-     *
68
-     * @param \DOMNode $doc The DOMNode object for the sniff.
69
-     *                      It represents the "documentation" tag in the XML
70
-     *                      standard file.
71
-     *
72
-     * @return string
73
-     */
74
-    protected function getTitle(\DOMNode $doc)
75
-    {
76
-        return $doc->getAttribute('title');
77
-
78
-    }//end getTitle()
79
-
80
-
81
-    /**
82
-     * Generates the documentation for a standard.
83
-     *
84
-     * It's probably wise for doc generators to override this method so they
85
-     * have control over how the docs are produced. Otherwise, the processSniff
86
-     * method should be overridden to output content for each sniff.
87
-     *
88
-     * @return void
89
-     * @see    processSniff()
90
-     */
91
-    public function generate()
92
-    {
93
-        foreach ($this->docFiles as $file) {
94
-            $doc = new \DOMDocument();
95
-            $doc->load($file);
96
-            $documentation = $doc->getElementsByTagName('documentation')->item(0);
97
-            $this->processSniff($documentation);
98
-        }
99
-
100
-    }//end generate()
101
-
102
-
103
-    /**
104
-     * Process the documentation for a single sniff.
105
-     *
106
-     * Doc generators must implement this function to produce output.
107
-     *
108
-     * @param \DOMNode $doc The DOMNode object for the sniff.
109
-     *                      It represents the "documentation" tag in the XML
110
-     *                      standard file.
111
-     *
112
-     * @return void
113
-     * @see    generate()
114
-     */
115
-    abstract protected function processSniff(\DOMNode $doc);
22
+	/**
23
+	 * The ruleset used for the run.
24
+	 *
25
+	 * @var \PHP_CodeSniffer\Ruleset
26
+	 */
27
+	public $ruleset = null;
28
+
29
+	/**
30
+	 * XML documentation files used to produce the final output.
31
+	 *
32
+	 * @var string[]
33
+	 */
34
+	public $docFiles = [];
35
+
36
+
37
+	/**
38
+	 * Constructs a doc generator.
39
+	 *
40
+	 * @param \PHP_CodeSniffer\Ruleset $ruleset The ruleset used for the run.
41
+	 *
42
+	 * @see generate()
43
+	 */
44
+	public function __construct(Ruleset $ruleset)
45
+	{
46
+		$this->ruleset = $ruleset;
47
+
48
+		foreach ($ruleset->sniffs as $className => $sniffClass) {
49
+			$file    = Autoload::getLoadedFileName($className);
50
+			$docFile = str_replace(
51
+				DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR,
52
+				DIRECTORY_SEPARATOR.'Docs'.DIRECTORY_SEPARATOR,
53
+				$file
54
+			);
55
+			$docFile = str_replace('Sniff.php', 'Standard.xml', $docFile);
56
+
57
+			if (is_file($docFile) === true) {
58
+				$this->docFiles[] = $docFile;
59
+			}
60
+		}
61
+
62
+	}//end __construct()
63
+
64
+
65
+	/**
66
+	 * Retrieves the title of the sniff from the DOMNode supplied.
67
+	 *
68
+	 * @param \DOMNode $doc The DOMNode object for the sniff.
69
+	 *                      It represents the "documentation" tag in the XML
70
+	 *                      standard file.
71
+	 *
72
+	 * @return string
73
+	 */
74
+	protected function getTitle(\DOMNode $doc)
75
+	{
76
+		return $doc->getAttribute('title');
77
+
78
+	}//end getTitle()
79
+
80
+
81
+	/**
82
+	 * Generates the documentation for a standard.
83
+	 *
84
+	 * It's probably wise for doc generators to override this method so they
85
+	 * have control over how the docs are produced. Otherwise, the processSniff
86
+	 * method should be overridden to output content for each sniff.
87
+	 *
88
+	 * @return void
89
+	 * @see    processSniff()
90
+	 */
91
+	public function generate()
92
+	{
93
+		foreach ($this->docFiles as $file) {
94
+			$doc = new \DOMDocument();
95
+			$doc->load($file);
96
+			$documentation = $doc->getElementsByTagName('documentation')->item(0);
97
+			$this->processSniff($documentation);
98
+		}
99
+
100
+	}//end generate()
101
+
102
+
103
+	/**
104
+	 * Process the documentation for a single sniff.
105
+	 *
106
+	 * Doc generators must implement this function to produce output.
107
+	 *
108
+	 * @param \DOMNode $doc The DOMNode object for the sniff.
109
+	 *                      It represents the "documentation" tag in the XML
110
+	 *                      standard file.
111
+	 *
112
+	 * @return void
113
+	 * @see    generate()
114
+	 */
115
+	abstract protected function processSniff(\DOMNode $doc);
116 116
 
117 117
 
118 118
 }//end class
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/src/Generators/HTML.php 1 patch
Indentation   +181 added lines, -181 removed lines patch added patch discarded remove patch
@@ -19,47 +19,47 @@  discard block
 block discarded – undo
19 19
 {
20 20
 
21 21
 
22
-    /**
23
-     * Generates the documentation for a standard.
24
-     *
25
-     * @return void
26
-     * @see    processSniff()
27
-     */
28
-    public function generate()
29
-    {
30
-        ob_start();
31
-        $this->printHeader();
32
-        $this->printToc();
33
-
34
-        foreach ($this->docFiles as $file) {
35
-            $doc = new \DOMDocument();
36
-            $doc->load($file);
37
-            $documentation = $doc->getElementsByTagName('documentation')->item(0);
38
-            $this->processSniff($documentation);
39
-        }
40
-
41
-        $this->printFooter();
42
-
43
-        $content = ob_get_contents();
44
-        ob_end_clean();
45
-
46
-        echo $content;
47
-
48
-    }//end generate()
49
-
50
-
51
-    /**
52
-     * Print the header of the HTML page.
53
-     *
54
-     * @return void
55
-     */
56
-    protected function printHeader()
57
-    {
58
-        $standard = $this->ruleset->name;
59
-        echo '<html>'.PHP_EOL;
60
-        echo ' <head>'.PHP_EOL;
61
-        echo "  <title>$standard Coding Standards</title>".PHP_EOL;
62
-        echo '  <style>
22
+	/**
23
+	 * Generates the documentation for a standard.
24
+	 *
25
+	 * @return void
26
+	 * @see    processSniff()
27
+	 */
28
+	public function generate()
29
+	{
30
+		ob_start();
31
+		$this->printHeader();
32
+		$this->printToc();
33
+
34
+		foreach ($this->docFiles as $file) {
35
+			$doc = new \DOMDocument();
36
+			$doc->load($file);
37
+			$documentation = $doc->getElementsByTagName('documentation')->item(0);
38
+			$this->processSniff($documentation);
39
+		}
40
+
41
+		$this->printFooter();
42
+
43
+		$content = ob_get_contents();
44
+		ob_end_clean();
45
+
46
+		echo $content;
47
+
48
+	}//end generate()
49
+
50
+
51
+	/**
52
+	 * Print the header of the HTML page.
53
+	 *
54
+	 * @return void
55
+	 */
56
+	protected function printHeader()
57
+	{
58
+		$standard = $this->ruleset->name;
59
+		echo '<html>'.PHP_EOL;
60
+		echo ' <head>'.PHP_EOL;
61
+		echo "  <title>$standard Coding Standards</title>".PHP_EOL;
62
+		echo '  <style>
63 63
                     body {
64 64
                         background-color: #FFFFFF;
65 65
                         font-size: 14px;
@@ -125,146 +125,146 @@  discard block
 block discarded – undo
125 125
                         color: #000000;
126 126
                     }
127 127
                 </style>'.PHP_EOL;
128
-        echo ' </head>'.PHP_EOL;
129
-        echo ' <body>'.PHP_EOL;
130
-        echo "  <h1>$standard Coding Standards</h1>".PHP_EOL;
131
-
132
-    }//end printHeader()
133
-
134
-
135
-    /**
136
-     * Print the table of contents for the standard.
137
-     *
138
-     * The TOC is just an unordered list of bookmarks to sniffs on the page.
139
-     *
140
-     * @return void
141
-     */
142
-    protected function printToc()
143
-    {
144
-        echo '  <h2>Table of Contents</h2>'.PHP_EOL;
145
-        echo '  <ul class="toc">'.PHP_EOL;
146
-
147
-        foreach ($this->docFiles as $file) {
148
-            $doc = new \DOMDocument();
149
-            $doc->load($file);
150
-            $documentation = $doc->getElementsByTagName('documentation')->item(0);
151
-            $title         = $this->getTitle($documentation);
152
-            echo '   <li><a href="#'.str_replace(' ', '-', $title)."\">$title</a></li>".PHP_EOL;
153
-        }
154
-
155
-        echo '  </ul>'.PHP_EOL;
156
-
157
-    }//end printToc()
158
-
159
-
160
-    /**
161
-     * Print the footer of the HTML page.
162
-     *
163
-     * @return void
164
-     */
165
-    protected function printFooter()
166
-    {
167
-        // Turn off errors so we don't get timezone warnings if people
168
-        // don't have their timezone set.
169
-        $errorLevel = error_reporting(0);
170
-        echo '  <div class="tag-line">';
171
-        echo 'Documentation generated on '.date('r');
172
-        echo ' by <a href="https://github.com/squizlabs/PHP_CodeSniffer">PHP_CodeSniffer '.Config::VERSION.'</a>';
173
-        echo '</div>'.PHP_EOL;
174
-        error_reporting($errorLevel);
175
-
176
-        echo ' </body>'.PHP_EOL;
177
-        echo '</html>'.PHP_EOL;
178
-
179
-    }//end printFooter()
180
-
181
-
182
-    /**
183
-     * Process the documentation for a single sniff.
184
-     *
185
-     * @param \DOMNode $doc The DOMNode object for the sniff.
186
-     *                      It represents the "documentation" tag in the XML
187
-     *                      standard file.
188
-     *
189
-     * @return void
190
-     */
191
-    public function processSniff(\DOMNode $doc)
192
-    {
193
-        $title = $this->getTitle($doc);
194
-        echo '  <a name="'.str_replace(' ', '-', $title).'" />'.PHP_EOL;
195
-        echo "  <h2>$title</h2>".PHP_EOL;
196
-
197
-        foreach ($doc->childNodes as $node) {
198
-            if ($node->nodeName === 'standard') {
199
-                $this->printTextBlock($node);
200
-            } else if ($node->nodeName === 'code_comparison') {
201
-                $this->printCodeComparisonBlock($node);
202
-            }
203
-        }
204
-
205
-    }//end processSniff()
206
-
207
-
208
-    /**
209
-     * Print a text block found in a standard.
210
-     *
211
-     * @param \DOMNode $node The DOMNode object for the text block.
212
-     *
213
-     * @return void
214
-     */
215
-    protected function printTextBlock(\DOMNode $node)
216
-    {
217
-        $content = trim($node->nodeValue);
218
-        $content = htmlspecialchars($content);
219
-
220
-        // Allow em tags only.
221
-        $content = str_replace('&lt;em&gt;', '<em>', $content);
222
-        $content = str_replace('&lt;/em&gt;', '</em>', $content);
223
-
224
-        echo "  <p class=\"text\">$content</p>".PHP_EOL;
225
-
226
-    }//end printTextBlock()
227
-
228
-
229
-    /**
230
-     * Print a code comparison block found in a standard.
231
-     *
232
-     * @param \DOMNode $node The DOMNode object for the code comparison block.
233
-     *
234
-     * @return void
235
-     */
236
-    protected function printCodeComparisonBlock(\DOMNode $node)
237
-    {
238
-        $codeBlocks = $node->getElementsByTagName('code');
239
-
240
-        $firstTitle = $codeBlocks->item(0)->getAttribute('title');
241
-        $first      = trim($codeBlocks->item(0)->nodeValue);
242
-        $first      = str_replace('<?php', '&lt;?php', $first);
243
-        $first      = str_replace("\n", '</br>', $first);
244
-        $first      = str_replace(' ', '&nbsp;', $first);
245
-        $first      = str_replace('<em>', '<span class="code-comparison-highlight">', $first);
246
-        $first      = str_replace('</em>', '</span>', $first);
247
-
248
-        $secondTitle = $codeBlocks->item(1)->getAttribute('title');
249
-        $second      = trim($codeBlocks->item(1)->nodeValue);
250
-        $second      = str_replace('<?php', '&lt;?php', $second);
251
-        $second      = str_replace("\n", '</br>', $second);
252
-        $second      = str_replace(' ', '&nbsp;', $second);
253
-        $second      = str_replace('<em>', '<span class="code-comparison-highlight">', $second);
254
-        $second      = str_replace('</em>', '</span>', $second);
255
-
256
-        echo '  <table class="code-comparison">'.PHP_EOL;
257
-        echo '   <tr>'.PHP_EOL;
258
-        echo "    <td class=\"code-comparison-title\">$firstTitle</td>".PHP_EOL;
259
-        echo "    <td class=\"code-comparison-title\">$secondTitle</td>".PHP_EOL;
260
-        echo '   </tr>'.PHP_EOL;
261
-        echo '   <tr>'.PHP_EOL;
262
-        echo "    <td class=\"code-comparison-code\">$first</td>".PHP_EOL;
263
-        echo "    <td class=\"code-comparison-code\">$second</td>".PHP_EOL;
264
-        echo '   </tr>'.PHP_EOL;
265
-        echo '  </table>'.PHP_EOL;
266
-
267
-    }//end printCodeComparisonBlock()
128
+		echo ' </head>'.PHP_EOL;
129
+		echo ' <body>'.PHP_EOL;
130
+		echo "  <h1>$standard Coding Standards</h1>".PHP_EOL;
131
+
132
+	}//end printHeader()
133
+
134
+
135
+	/**
136
+	 * Print the table of contents for the standard.
137
+	 *
138
+	 * The TOC is just an unordered list of bookmarks to sniffs on the page.
139
+	 *
140
+	 * @return void
141
+	 */
142
+	protected function printToc()
143
+	{
144
+		echo '  <h2>Table of Contents</h2>'.PHP_EOL;
145
+		echo '  <ul class="toc">'.PHP_EOL;
146
+
147
+		foreach ($this->docFiles as $file) {
148
+			$doc = new \DOMDocument();
149
+			$doc->load($file);
150
+			$documentation = $doc->getElementsByTagName('documentation')->item(0);
151
+			$title         = $this->getTitle($documentation);
152
+			echo '   <li><a href="#'.str_replace(' ', '-', $title)."\">$title</a></li>".PHP_EOL;
153
+		}
154
+
155
+		echo '  </ul>'.PHP_EOL;
156
+
157
+	}//end printToc()
158
+
159
+
160
+	/**
161
+	 * Print the footer of the HTML page.
162
+	 *
163
+	 * @return void
164
+	 */
165
+	protected function printFooter()
166
+	{
167
+		// Turn off errors so we don't get timezone warnings if people
168
+		// don't have their timezone set.
169
+		$errorLevel = error_reporting(0);
170
+		echo '  <div class="tag-line">';
171
+		echo 'Documentation generated on '.date('r');
172
+		echo ' by <a href="https://github.com/squizlabs/PHP_CodeSniffer">PHP_CodeSniffer '.Config::VERSION.'</a>';
173
+		echo '</div>'.PHP_EOL;
174
+		error_reporting($errorLevel);
175
+
176
+		echo ' </body>'.PHP_EOL;
177
+		echo '</html>'.PHP_EOL;
178
+
179
+	}//end printFooter()
180
+
181
+
182
+	/**
183
+	 * Process the documentation for a single sniff.
184
+	 *
185
+	 * @param \DOMNode $doc The DOMNode object for the sniff.
186
+	 *                      It represents the "documentation" tag in the XML
187
+	 *                      standard file.
188
+	 *
189
+	 * @return void
190
+	 */
191
+	public function processSniff(\DOMNode $doc)
192
+	{
193
+		$title = $this->getTitle($doc);
194
+		echo '  <a name="'.str_replace(' ', '-', $title).'" />'.PHP_EOL;
195
+		echo "  <h2>$title</h2>".PHP_EOL;
196
+
197
+		foreach ($doc->childNodes as $node) {
198
+			if ($node->nodeName === 'standard') {
199
+				$this->printTextBlock($node);
200
+			} else if ($node->nodeName === 'code_comparison') {
201
+				$this->printCodeComparisonBlock($node);
202
+			}
203
+		}
204
+
205
+	}//end processSniff()
206
+
207
+
208
+	/**
209
+	 * Print a text block found in a standard.
210
+	 *
211
+	 * @param \DOMNode $node The DOMNode object for the text block.
212
+	 *
213
+	 * @return void
214
+	 */
215
+	protected function printTextBlock(\DOMNode $node)
216
+	{
217
+		$content = trim($node->nodeValue);
218
+		$content = htmlspecialchars($content);
219
+
220
+		// Allow em tags only.
221
+		$content = str_replace('&lt;em&gt;', '<em>', $content);
222
+		$content = str_replace('&lt;/em&gt;', '</em>', $content);
223
+
224
+		echo "  <p class=\"text\">$content</p>".PHP_EOL;
225
+
226
+	}//end printTextBlock()
227
+
228
+
229
+	/**
230
+	 * Print a code comparison block found in a standard.
231
+	 *
232
+	 * @param \DOMNode $node The DOMNode object for the code comparison block.
233
+	 *
234
+	 * @return void
235
+	 */
236
+	protected function printCodeComparisonBlock(\DOMNode $node)
237
+	{
238
+		$codeBlocks = $node->getElementsByTagName('code');
239
+
240
+		$firstTitle = $codeBlocks->item(0)->getAttribute('title');
241
+		$first      = trim($codeBlocks->item(0)->nodeValue);
242
+		$first      = str_replace('<?php', '&lt;?php', $first);
243
+		$first      = str_replace("\n", '</br>', $first);
244
+		$first      = str_replace(' ', '&nbsp;', $first);
245
+		$first      = str_replace('<em>', '<span class="code-comparison-highlight">', $first);
246
+		$first      = str_replace('</em>', '</span>', $first);
247
+
248
+		$secondTitle = $codeBlocks->item(1)->getAttribute('title');
249
+		$second      = trim($codeBlocks->item(1)->nodeValue);
250
+		$second      = str_replace('<?php', '&lt;?php', $second);
251
+		$second      = str_replace("\n", '</br>', $second);
252
+		$second      = str_replace(' ', '&nbsp;', $second);
253
+		$second      = str_replace('<em>', '<span class="code-comparison-highlight">', $second);
254
+		$second      = str_replace('</em>', '</span>', $second);
255
+
256
+		echo '  <table class="code-comparison">'.PHP_EOL;
257
+		echo '   <tr>'.PHP_EOL;
258
+		echo "    <td class=\"code-comparison-title\">$firstTitle</td>".PHP_EOL;
259
+		echo "    <td class=\"code-comparison-title\">$secondTitle</td>".PHP_EOL;
260
+		echo '   </tr>'.PHP_EOL;
261
+		echo '   <tr>'.PHP_EOL;
262
+		echo "    <td class=\"code-comparison-code\">$first</td>".PHP_EOL;
263
+		echo "    <td class=\"code-comparison-code\">$second</td>".PHP_EOL;
264
+		echo '   </tr>'.PHP_EOL;
265
+		echo '  </table>'.PHP_EOL;
266
+
267
+	}//end printCodeComparisonBlock()
268 268
 
269 269
 
270 270
 }//end class
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 
47 47
         $suite = new TestSuite('PHP CodeSniffer Standards');
48 48
 
49
-        $isInstalled = !is_file(__DIR__.'/../../autoload.php');
49
+        $isInstalled = ! is_file(__DIR__.'/../../autoload.php');
50 50
 
51 51
         // Optionally allow for ignoring the tests for one or more standards.
52 52
         $ignoreTestsForStandards = getenv('PHPCS_IGNORE_TESTS');
Please login to merge, or discard this patch.
Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -18,106 +18,106 @@
 block discarded – undo
18 18
 {
19 19
 
20 20
 
21
-    /**
22
-     * Prepare the test runner.
23
-     *
24
-     * @return void
25
-     */
26
-    public static function main()
27
-    {
28
-        TestRunner::run(self::suite());
29
-
30
-    }//end main()
31
-
32
-
33
-    /**
34
-     * Add all sniff unit tests into a test suite.
35
-     *
36
-     * Sniff unit tests are found by recursing through the 'Tests' directory
37
-     * of each installed coding standard.
38
-     *
39
-     * @return \PHPUnit\Framework\TestSuite
40
-     */
41
-    public static function suite()
42
-    {
43
-        $GLOBALS['PHP_CODESNIFFER_SNIFF_CODES']      = [];
44
-        $GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES']    = [];
45
-        $GLOBALS['PHP_CODESNIFFER_SNIFF_CASE_FILES'] = [];
46
-
47
-        $suite = new TestSuite('PHP CodeSniffer Standards');
48
-
49
-        $isInstalled = !is_file(__DIR__.'/../../autoload.php');
50
-
51
-        // Optionally allow for ignoring the tests for one or more standards.
52
-        $ignoreTestsForStandards = getenv('PHPCS_IGNORE_TESTS');
53
-        if ($ignoreTestsForStandards === false) {
54
-            $ignoreTestsForStandards = [];
55
-        } else {
56
-            $ignoreTestsForStandards = explode(',', $ignoreTestsForStandards);
57
-        }
58
-
59
-        $installedStandards = self::getInstalledStandardDetails();
60
-
61
-        foreach ($installedStandards as $standard => $details) {
62
-            Autoload::addSearchPath($details['path'], $details['namespace']);
63
-
64
-            // If the test is running PEAR installed, the built-in standards
65
-            // are split into different directories; one for the sniffs and
66
-            // a different file system location for tests.
67
-            if ($isInstalled === true && is_dir(dirname($details['path']).DIRECTORY_SEPARATOR.'Generic') === true) {
68
-                $testPath = realpath(__DIR__.'/../../src/Standards/'.$standard);
69
-            } else {
70
-                $testPath = $details['path'];
71
-            }
72
-
73
-            if (in_array($standard, $ignoreTestsForStandards, true) === true) {
74
-                continue;
75
-            }
76
-
77
-            $testsDir = $testPath.DIRECTORY_SEPARATOR.'Tests'.DIRECTORY_SEPARATOR;
78
-            if (is_dir($testsDir) === false) {
79
-                // No tests for this standard.
80
-                continue;
81
-            }
82
-
83
-            $di = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($testsDir));
84
-
85
-            foreach ($di as $file) {
86
-                // Skip hidden files.
87
-                if (substr($file->getFilename(), 0, 1) === '.') {
88
-                    continue;
89
-                }
90
-
91
-                // Tests must have the extension 'php'.
92
-                $parts = explode('.', $file);
93
-                $ext   = array_pop($parts);
94
-                if ($ext !== 'php') {
95
-                    continue;
96
-                }
97
-
98
-                $className = Autoload::loadFile($file->getPathname());
99
-                $GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'][$className] = $details['path'];
100
-                $GLOBALS['PHP_CODESNIFFER_TEST_DIRS'][$className]     = $testsDir;
101
-                $suite->addTestSuite($className);
102
-            }
103
-        }//end foreach
104
-
105
-        return $suite;
106
-
107
-    }//end suite()
108
-
109
-
110
-    /**
111
-     * Get the details of all coding standards installed.
112
-     *
113
-     * @return array
114
-     * @see    Standards::getInstalledStandardDetails()
115
-     */
116
-    protected static function getInstalledStandardDetails()
117
-    {
118
-        return Standards::getInstalledStandardDetails(true);
119
-
120
-    }//end getInstalledStandardDetails()
21
+	/**
22
+	 * Prepare the test runner.
23
+	 *
24
+	 * @return void
25
+	 */
26
+	public static function main()
27
+	{
28
+		TestRunner::run(self::suite());
29
+
30
+	}//end main()
31
+
32
+
33
+	/**
34
+	 * Add all sniff unit tests into a test suite.
35
+	 *
36
+	 * Sniff unit tests are found by recursing through the 'Tests' directory
37
+	 * of each installed coding standard.
38
+	 *
39
+	 * @return \PHPUnit\Framework\TestSuite
40
+	 */
41
+	public static function suite()
42
+	{
43
+		$GLOBALS['PHP_CODESNIFFER_SNIFF_CODES']      = [];
44
+		$GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES']    = [];
45
+		$GLOBALS['PHP_CODESNIFFER_SNIFF_CASE_FILES'] = [];
46
+
47
+		$suite = new TestSuite('PHP CodeSniffer Standards');
48
+
49
+		$isInstalled = !is_file(__DIR__.'/../../autoload.php');
50
+
51
+		// Optionally allow for ignoring the tests for one or more standards.
52
+		$ignoreTestsForStandards = getenv('PHPCS_IGNORE_TESTS');
53
+		if ($ignoreTestsForStandards === false) {
54
+			$ignoreTestsForStandards = [];
55
+		} else {
56
+			$ignoreTestsForStandards = explode(',', $ignoreTestsForStandards);
57
+		}
58
+
59
+		$installedStandards = self::getInstalledStandardDetails();
60
+
61
+		foreach ($installedStandards as $standard => $details) {
62
+			Autoload::addSearchPath($details['path'], $details['namespace']);
63
+
64
+			// If the test is running PEAR installed, the built-in standards
65
+			// are split into different directories; one for the sniffs and
66
+			// a different file system location for tests.
67
+			if ($isInstalled === true && is_dir(dirname($details['path']).DIRECTORY_SEPARATOR.'Generic') === true) {
68
+				$testPath = realpath(__DIR__.'/../../src/Standards/'.$standard);
69
+			} else {
70
+				$testPath = $details['path'];
71
+			}
72
+
73
+			if (in_array($standard, $ignoreTestsForStandards, true) === true) {
74
+				continue;
75
+			}
76
+
77
+			$testsDir = $testPath.DIRECTORY_SEPARATOR.'Tests'.DIRECTORY_SEPARATOR;
78
+			if (is_dir($testsDir) === false) {
79
+				// No tests for this standard.
80
+				continue;
81
+			}
82
+
83
+			$di = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($testsDir));
84
+
85
+			foreach ($di as $file) {
86
+				// Skip hidden files.
87
+				if (substr($file->getFilename(), 0, 1) === '.') {
88
+					continue;
89
+				}
90
+
91
+				// Tests must have the extension 'php'.
92
+				$parts = explode('.', $file);
93
+				$ext   = array_pop($parts);
94
+				if ($ext !== 'php') {
95
+					continue;
96
+				}
97
+
98
+				$className = Autoload::loadFile($file->getPathname());
99
+				$GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'][$className] = $details['path'];
100
+				$GLOBALS['PHP_CODESNIFFER_TEST_DIRS'][$className]     = $testsDir;
101
+				$suite->addTestSuite($className);
102
+			}
103
+		}//end foreach
104
+
105
+		return $suite;
106
+
107
+	}//end suite()
108
+
109
+
110
+	/**
111
+	 * Get the details of all coding standards installed.
112
+	 *
113
+	 * @return array
114
+	 * @see    Standards::getInstalledStandardDetails()
115
+	 */
116
+	protected static function getInstalledStandardDetails()
117
+	{
118
+		return Standards::getInstalledStandardDetails(true);
119
+
120
+	}//end getInstalledStandardDetails()
121 121
 
122 122
 
123 123
 }//end class
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/tests/TestSuite7.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,20 +16,20 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    /**
20
-     * Runs the tests and collects their result in a TestResult.
21
-     *
22
-     * @param \PHPUnit\Framework\TestResult $result A test result.
23
-     *
24
-     * @return \PHPUnit\Framework\TestResult
25
-     */
26
-    public function run(TestResult $result=null): TestResult
27
-    {
28
-        $result = parent::run($result);
29
-        printPHPCodeSnifferTestOutput();
30
-        return $result;
31
-
32
-    }//end run()
19
+	/**
20
+	 * Runs the tests and collects their result in a TestResult.
21
+	 *
22
+	 * @param \PHPUnit\Framework\TestResult $result A test result.
23
+	 *
24
+	 * @return \PHPUnit\Framework\TestResult
25
+	 */
26
+	public function run(TestResult $result=null): TestResult
27
+	{
28
+		$result = parent::run($result);
29
+		printPHPCodeSnifferTestOutput();
30
+		return $result;
31
+
32
+	}//end run()
33 33
 
34 34
 
35 35
 }//end class
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      *
24 24
      * @return \PHPUnit\Framework\TestResult
25 25
      */
26
-    public function run(TestResult $result=null): TestResult
26
+    public function run(TestResult $result = null): TestResult
27 27
     {
28 28
         $result = parent::run($result);
29 29
         printPHPCodeSnifferTestOutput();
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/tests/Core/IsCamelCapsTest.php 1 patch
Indentation   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -16,120 +16,120 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    /**
20
-     * Test valid public function/method names.
21
-     *
22
-     * @return void
23
-     */
24
-    public function testValidNotClassFormatPublic()
25
-    {
26
-        $this->assertTrue(Common::isCamelCaps('thisIsCamelCaps', false, true, true));
27
-        $this->assertTrue(Common::isCamelCaps('thisISCamelCaps', false, true, false));
28
-
29
-    }//end testValidNotClassFormatPublic()
30
-
31
-
32
-    /**
33
-     * Test invalid public function/method names.
34
-     *
35
-     * @return void
36
-     */
37
-    public function testInvalidNotClassFormatPublic()
38
-    {
39
-        $this->assertFalse(Common::isCamelCaps('_thisIsCamelCaps', false, true, true));
40
-        $this->assertFalse(Common::isCamelCaps('thisISCamelCaps', false, true, true));
41
-        $this->assertFalse(Common::isCamelCaps('ThisIsCamelCaps', false, true, true));
42
-
43
-        $this->assertFalse(Common::isCamelCaps('3thisIsCamelCaps', false, true, true));
44
-        $this->assertFalse(Common::isCamelCaps('*thisIsCamelCaps', false, true, true));
45
-        $this->assertFalse(Common::isCamelCaps('-thisIsCamelCaps', false, true, true));
46
-
47
-        $this->assertFalse(Common::isCamelCaps('this*IsCamelCaps', false, true, true));
48
-        $this->assertFalse(Common::isCamelCaps('this-IsCamelCaps', false, true, true));
49
-        $this->assertFalse(Common::isCamelCaps('this_IsCamelCaps', false, true, true));
50
-        $this->assertFalse(Common::isCamelCaps('this_is_camel_caps', false, true, true));
51
-
52
-    }//end testInvalidNotClassFormatPublic()
53
-
54
-
55
-    /**
56
-     * Test valid private method names.
57
-     *
58
-     * @return void
59
-     */
60
-    public function testValidNotClassFormatPrivate()
61
-    {
62
-        $this->assertTrue(Common::isCamelCaps('_thisIsCamelCaps', false, false, true));
63
-        $this->assertTrue(Common::isCamelCaps('_thisISCamelCaps', false, false, false));
64
-        $this->assertTrue(Common::isCamelCaps('_i18N', false, false, true));
65
-        $this->assertTrue(Common::isCamelCaps('_i18n', false, false, true));
66
-
67
-    }//end testValidNotClassFormatPrivate()
68
-
69
-
70
-    /**
71
-     * Test invalid private method names.
72
-     *
73
-     * @return void
74
-     */
75
-    public function testInvalidNotClassFormatPrivate()
76
-    {
77
-        $this->assertFalse(Common::isCamelCaps('thisIsCamelCaps', false, false, true));
78
-        $this->assertFalse(Common::isCamelCaps('_thisISCamelCaps', false, false, true));
79
-        $this->assertFalse(Common::isCamelCaps('_ThisIsCamelCaps', false, false, true));
80
-        $this->assertFalse(Common::isCamelCaps('__thisIsCamelCaps', false, false, true));
81
-        $this->assertFalse(Common::isCamelCaps('__thisISCamelCaps', false, false, false));
82
-
83
-        $this->assertFalse(Common::isCamelCaps('3thisIsCamelCaps', false, false, true));
84
-        $this->assertFalse(Common::isCamelCaps('*thisIsCamelCaps', false, false, true));
85
-        $this->assertFalse(Common::isCamelCaps('-thisIsCamelCaps', false, false, true));
86
-        $this->assertFalse(Common::isCamelCaps('_this_is_camel_caps', false, false, true));
87
-
88
-    }//end testInvalidNotClassFormatPrivate()
89
-
90
-
91
-    /**
92
-     * Test valid class names.
93
-     *
94
-     * @return void
95
-     */
96
-    public function testValidClassFormatPublic()
97
-    {
98
-        $this->assertTrue(Common::isCamelCaps('ThisIsCamelCaps', true, true, true));
99
-        $this->assertTrue(Common::isCamelCaps('ThisISCamelCaps', true, true, false));
100
-        $this->assertTrue(Common::isCamelCaps('This3IsCamelCaps', true, true, false));
101
-
102
-    }//end testValidClassFormatPublic()
103
-
104
-
105
-    /**
106
-     * Test invalid class names.
107
-     *
108
-     * @return void
109
-     */
110
-    public function testInvalidClassFormat()
111
-    {
112
-        $this->assertFalse(Common::isCamelCaps('thisIsCamelCaps', true));
113
-        $this->assertFalse(Common::isCamelCaps('This-IsCamelCaps', true));
114
-        $this->assertFalse(Common::isCamelCaps('This_Is_Camel_Caps', true));
115
-
116
-    }//end testInvalidClassFormat()
117
-
118
-
119
-    /**
120
-     * Test invalid class names with the private flag set.
121
-     *
122
-     * Note that the private flag is ignored if the class format
123
-     * flag is set, so these names are all invalid.
124
-     *
125
-     * @return void
126
-     */
127
-    public function testInvalidClassFormatPrivate()
128
-    {
129
-        $this->assertFalse(Common::isCamelCaps('_ThisIsCamelCaps', true, true));
130
-        $this->assertFalse(Common::isCamelCaps('_ThisIsCamelCaps', true, false));
131
-
132
-    }//end testInvalidClassFormatPrivate()
19
+	/**
20
+	 * Test valid public function/method names.
21
+	 *
22
+	 * @return void
23
+	 */
24
+	public function testValidNotClassFormatPublic()
25
+	{
26
+		$this->assertTrue(Common::isCamelCaps('thisIsCamelCaps', false, true, true));
27
+		$this->assertTrue(Common::isCamelCaps('thisISCamelCaps', false, true, false));
28
+
29
+	}//end testValidNotClassFormatPublic()
30
+
31
+
32
+	/**
33
+	 * Test invalid public function/method names.
34
+	 *
35
+	 * @return void
36
+	 */
37
+	public function testInvalidNotClassFormatPublic()
38
+	{
39
+		$this->assertFalse(Common::isCamelCaps('_thisIsCamelCaps', false, true, true));
40
+		$this->assertFalse(Common::isCamelCaps('thisISCamelCaps', false, true, true));
41
+		$this->assertFalse(Common::isCamelCaps('ThisIsCamelCaps', false, true, true));
42
+
43
+		$this->assertFalse(Common::isCamelCaps('3thisIsCamelCaps', false, true, true));
44
+		$this->assertFalse(Common::isCamelCaps('*thisIsCamelCaps', false, true, true));
45
+		$this->assertFalse(Common::isCamelCaps('-thisIsCamelCaps', false, true, true));
46
+
47
+		$this->assertFalse(Common::isCamelCaps('this*IsCamelCaps', false, true, true));
48
+		$this->assertFalse(Common::isCamelCaps('this-IsCamelCaps', false, true, true));
49
+		$this->assertFalse(Common::isCamelCaps('this_IsCamelCaps', false, true, true));
50
+		$this->assertFalse(Common::isCamelCaps('this_is_camel_caps', false, true, true));
51
+
52
+	}//end testInvalidNotClassFormatPublic()
53
+
54
+
55
+	/**
56
+	 * Test valid private method names.
57
+	 *
58
+	 * @return void
59
+	 */
60
+	public function testValidNotClassFormatPrivate()
61
+	{
62
+		$this->assertTrue(Common::isCamelCaps('_thisIsCamelCaps', false, false, true));
63
+		$this->assertTrue(Common::isCamelCaps('_thisISCamelCaps', false, false, false));
64
+		$this->assertTrue(Common::isCamelCaps('_i18N', false, false, true));
65
+		$this->assertTrue(Common::isCamelCaps('_i18n', false, false, true));
66
+
67
+	}//end testValidNotClassFormatPrivate()
68
+
69
+
70
+	/**
71
+	 * Test invalid private method names.
72
+	 *
73
+	 * @return void
74
+	 */
75
+	public function testInvalidNotClassFormatPrivate()
76
+	{
77
+		$this->assertFalse(Common::isCamelCaps('thisIsCamelCaps', false, false, true));
78
+		$this->assertFalse(Common::isCamelCaps('_thisISCamelCaps', false, false, true));
79
+		$this->assertFalse(Common::isCamelCaps('_ThisIsCamelCaps', false, false, true));
80
+		$this->assertFalse(Common::isCamelCaps('__thisIsCamelCaps', false, false, true));
81
+		$this->assertFalse(Common::isCamelCaps('__thisISCamelCaps', false, false, false));
82
+
83
+		$this->assertFalse(Common::isCamelCaps('3thisIsCamelCaps', false, false, true));
84
+		$this->assertFalse(Common::isCamelCaps('*thisIsCamelCaps', false, false, true));
85
+		$this->assertFalse(Common::isCamelCaps('-thisIsCamelCaps', false, false, true));
86
+		$this->assertFalse(Common::isCamelCaps('_this_is_camel_caps', false, false, true));
87
+
88
+	}//end testInvalidNotClassFormatPrivate()
89
+
90
+
91
+	/**
92
+	 * Test valid class names.
93
+	 *
94
+	 * @return void
95
+	 */
96
+	public function testValidClassFormatPublic()
97
+	{
98
+		$this->assertTrue(Common::isCamelCaps('ThisIsCamelCaps', true, true, true));
99
+		$this->assertTrue(Common::isCamelCaps('ThisISCamelCaps', true, true, false));
100
+		$this->assertTrue(Common::isCamelCaps('This3IsCamelCaps', true, true, false));
101
+
102
+	}//end testValidClassFormatPublic()
103
+
104
+
105
+	/**
106
+	 * Test invalid class names.
107
+	 *
108
+	 * @return void
109
+	 */
110
+	public function testInvalidClassFormat()
111
+	{
112
+		$this->assertFalse(Common::isCamelCaps('thisIsCamelCaps', true));
113
+		$this->assertFalse(Common::isCamelCaps('This-IsCamelCaps', true));
114
+		$this->assertFalse(Common::isCamelCaps('This_Is_Camel_Caps', true));
115
+
116
+	}//end testInvalidClassFormat()
117
+
118
+
119
+	/**
120
+	 * Test invalid class names with the private flag set.
121
+	 *
122
+	 * Note that the private flag is ignored if the class format
123
+	 * flag is set, so these names are all invalid.
124
+	 *
125
+	 * @return void
126
+	 */
127
+	public function testInvalidClassFormatPrivate()
128
+	{
129
+		$this->assertFalse(Common::isCamelCaps('_ThisIsCamelCaps', true, true));
130
+		$this->assertFalse(Common::isCamelCaps('_ThisIsCamelCaps', true, false));
131
+
132
+	}//end testInvalidClassFormatPrivate()
133 133
 
134 134
 
135 135
 }//end class
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/tests/TestSuite.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,20 +16,20 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    /**
20
-     * Runs the tests and collects their result in a TestResult.
21
-     *
22
-     * @param \PHPUnit\Framework\TestResult $result A test result.
23
-     *
24
-     * @return \PHPUnit\Framework\TestResult
25
-     */
26
-    public function run(TestResult $result=null)
27
-    {
28
-        $result = parent::run($result);
29
-        printPHPCodeSnifferTestOutput();
30
-        return $result;
31
-
32
-    }//end run()
19
+	/**
20
+	 * Runs the tests and collects their result in a TestResult.
21
+	 *
22
+	 * @param \PHPUnit\Framework\TestResult $result A test result.
23
+	 *
24
+	 * @return \PHPUnit\Framework\TestResult
25
+	 */
26
+	public function run(TestResult $result=null)
27
+	{
28
+		$result = parent::run($result);
29
+		printPHPCodeSnifferTestOutput();
30
+		return $result;
31
+
32
+	}//end run()
33 33
 
34 34
 
35 35
 }//end class
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      *
24 24
      * @return \PHPUnit\Framework\TestResult
25 25
      */
26
-    public function run(TestResult $result=null)
26
+    public function run(TestResult $result = null)
27 27
     {
28 28
         $result = parent::run($result);
29 29
         printPHPCodeSnifferTestOutput();
Please login to merge, or discard this patch.
wp-coding-standards/wpcs/WordPress/Sniffs/PHP/StrictComparisonsSniff.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
 	 *
47 47
 	 * @return void
48 48
 	 */
49
-	public function process_token( $stackPtr ) {
49
+	public function process_token($stackPtr) {
50 50
 
51
-		if ( ! $this->has_whitelist_comment( 'loose comparison', $stackPtr ) ) {
52
-			$error = 'Found: ' . $this->tokens[ $stackPtr ]['content'] . '. Use strict comparisons (=== or !==).';
53
-			$this->phpcsFile->addWarning( $error, $stackPtr, 'LooseComparison' );
51
+		if ( ! $this->has_whitelist_comment('loose comparison', $stackPtr)) {
52
+			$error = 'Found: '.$this->tokens[$stackPtr]['content'].'. Use strict comparisons (=== or !==).';
53
+			$this->phpcsFile->addWarning($error, $stackPtr, 'LooseComparison');
54 54
 		}
55 55
 
56 56
 	}
Please login to merge, or discard this patch.
wp-coding-standards/wpcs/WordPress/AbstractFunctionParameterSniff.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
 	 * @return array
46 46
 	 */
47 47
 	public function getGroups() {
48
-		if ( empty( $this->target_functions ) ) {
48
+		if (empty($this->target_functions)) {
49 49
 			return array();
50 50
 		}
51 51
 
52 52
 		return array(
53 53
 			$this->group_name => array(
54
-				'functions' => array_keys( $this->target_functions ),
54
+				'functions' => array_keys($this->target_functions),
55 55
 			),
56 56
 		);
57 57
 	}
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
 	 * @return int|void Integer stack pointer to skip forward or void to continue
67 67
 	 *                  normal file processing.
68 68
 	 */
69
-	public function process_matched_token( $stackPtr, $group_name, $matched_content ) {
69
+	public function process_matched_token($stackPtr, $group_name, $matched_content) {
70 70
 
71
-		$parameters = $this->get_function_call_parameters( $stackPtr );
71
+		$parameters = $this->get_function_call_parameters($stackPtr);
72 72
 
73
-		if ( empty( $parameters ) ) {
74
-			return $this->process_no_parameters( $stackPtr, $group_name, $matched_content );
73
+		if (empty($parameters)) {
74
+			return $this->process_no_parameters($stackPtr, $group_name, $matched_content);
75 75
 		} else {
76
-			return $this->process_parameters( $stackPtr, $group_name, $matched_content, $parameters );
76
+			return $this->process_parameters($stackPtr, $group_name, $matched_content, $parameters);
77 77
 		}
78 78
 	}
79 79
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 * @return int|void Integer stack pointer to skip forward or void to continue
91 91
 	 *                  normal file processing.
92 92
 	 */
93
-	abstract public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters );
93
+	abstract public function process_parameters($stackPtr, $group_name, $matched_content, $parameters);
94 94
 
95 95
 	/**
96 96
 	 * Process the function if no parameters were found.
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 * @return int|void Integer stack pointer to skip forward or void to continue
106 106
 	 *                  normal file processing.
107 107
 	 */
108
-	public function process_no_parameters( $stackPtr, $group_name, $matched_content ) {
108
+	public function process_no_parameters($stackPtr, $group_name, $matched_content) {
109 109
 		return;
110 110
 	}
111 111
 
Please login to merge, or discard this patch.
core/services/assets/AssetRegistrationException.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@
 block discarded – undo
16 16
  */
17 17
 class AssetRegistrationException extends RuntimeException
18 18
 {
19
-    /**
20
-     * @param                $script_handle
21
-     * @param string         $message
22
-     * @param int            $code
23
-     * @param Exception|null $previous
24
-     */
25
-    public function __construct($script_handle, $message = '', $code = 0, Exception $previous = null)
26
-    {
27
-        if (empty($message)) {
28
-            $message = sprintf(
29
-                esc_html_x(
30
-                    'The "%1$s" script could not be registered with WordPress core.',
31
-                    'The "script-handle" script could not be registered with WordPress core.',
32
-                    'event_espresso'
33
-                ),
34
-                $script_handle
35
-            );
36
-        }
37
-        parent::__construct($message, $code, $previous);
38
-    }
19
+	/**
20
+	 * @param                $script_handle
21
+	 * @param string         $message
22
+	 * @param int            $code
23
+	 * @param Exception|null $previous
24
+	 */
25
+	public function __construct($script_handle, $message = '', $code = 0, Exception $previous = null)
26
+	{
27
+		if (empty($message)) {
28
+			$message = sprintf(
29
+				esc_html_x(
30
+					'The "%1$s" script could not be registered with WordPress core.',
31
+					'The "script-handle" script could not be registered with WordPress core.',
32
+					'event_espresso'
33
+				),
34
+				$script_handle
35
+			);
36
+		}
37
+		parent::__construct($message, $code, $previous);
38
+	}
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.