Skip to content

Commit 91e4384

Browse files
committed
Move FileList class
... from the `scripts` directory to the `tests` directory and namespace the class.
1 parent 0de03b7 commit 91e4384

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

package.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
217217
</dir>
218218
<file baseinstalldir="" name="AllTests.php" role="test" />
219219
<file baseinstalldir="" name="bootstrap.php" role="test" />
220+
<file baseinstalldir="" name="FileList.php" role="test" />
220221
<file baseinstalldir="" name="TestSuite.php" role="test" />
221222
<file baseinstalldir="" name="TestSuite7.php" role="test" />
222223
</dir>
@@ -1957,6 +1958,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
19571958
<install as="LICENCE" name="licence.txt" />
19581959
<install as="phpunit.xml" name="phpunit.xml.dist" />
19591960
<install as="AllTests.php" name="tests/AllTests.php" />
1961+
<install as="FileList.php" name="tests/FileList.php" />
19601962
<install as="TestSuite.php" name="tests/TestSuite.php" />
19611963
<install as="TestSuite7.php" name="tests/TestSuite7.php" />
19621964
<install as="tests/bootstrap.php" name="tests/bootstrap.php" />
@@ -1994,6 +1996,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
19941996
<install as="phpunit.xml" name="phpunit.xml.dist" />
19951997
<install as="tests/AllTests.php" name="tests/AllTests.php" />
19961998
<install as="tests/bootstrap.php" name="tests/bootstrap.php" />
1999+
<install as="tests/FileList.php" name="tests/FileList.php" />
19972000
<install as="tests/TestSuite.php" name="tests/TestSuite.php" />
19982001
<install as="tests/TestSuite7.php" name="tests/TestSuite7.php" />
19992002
<install as="CodeSniffer/Core/AbstractMethodUnitTest.php" name="tests/Core/AbstractMethodUnitTest.php" />

scripts/ValidatePEAR/ValidatePEARPackageXML.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
1212
*/
1313

14+
use PHP_CodeSniffer\Tests\FileList;
15+
1416
/**
1517
* Validate the PHP_CodeSniffer PEAR package.xml file.
1618
*/

scripts/validate-pear-package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
1313
*/
1414

15-
require_once __DIR__.'/ValidatePEAR/FileList.php';
15+
require_once dirname(__DIR__).'/tests/FileList.php';
1616
require_once __DIR__.'/ValidatePEAR/ValidatePEARPackageXML.php';
1717

1818
$validate = new ValidatePEARPackageXML();

scripts/ValidatePEAR/FileList.php renamed to tests/FileList.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
<?php
22
/**
3-
* Retrieve a filtered file list.
3+
* Class to retrieve a filtered file list.
44
*
5-
* PHP version 5
6-
*
7-
* @category PHP
8-
* @package PHP_CodeSniffer
95
* @author Juliette Reinders Folmer <phpcs_nospam@adviesenzo.nl>
106
* @copyright 2019 Juliette Reinders Folmer. All rights reserved.
117
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
128
*/
139

14-
/**
15-
* Class to create a file list with filtering.
16-
*/
10+
namespace PHP_CodeSniffer\Tests;
11+
1712
class FileList
1813
{
1914

0 commit comments

Comments
 (0)