PHP 8.2.31
Preview: EndFileNewlineUnitTest.php Size: 1.98 KB
/opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.php

<?php
/**
 * Unit test class for the EndFileNewline sniff.
 *
 * @author    Greg Sherwood <gsherwood@squiz.net>
 * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
 * @license   https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/HEAD/licence.txt BSD Licence
 */

namespace PHP_CodeSniffer\Standards\PSR2\Tests\Files;

use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;

/**
 * Unit test class for the EndFileNewline sniff.
 *
 * @covers \PHP_CodeSniffer\Standards\PSR2\Sniffs\Files\EndFileNewlineSniff
 */
final class EndFileNewlineUnitTest extends AbstractSniffUnitTest
{


    /**
     * Returns the lines where errors should occur.
     *
     * The key of the array should represent the line number and the value
     * should represent the number of errors that should occur on that line.
     *
     * @param string $testFile The name of the file being tested.
     *
     * @return array<int, int>
     */
    public function getErrorList($testFile='')
    {
        switch ($testFile) {
        case 'EndFileNewlineUnitTest.1.inc':
        case 'EndFileNewlineUnitTest.3.inc':
        case 'EndFileNewlineUnitTest.6.inc':
        case 'EndFileNewlineUnitTest.7.inc':
        case 'EndFileNewlineUnitTest.9.inc':
        case 'EndFileNewlineUnitTest.10.inc':
            return [2 => 1];
        case 'EndFileNewlineUnitTest.11.inc':
        case 'EndFileNewlineUnitTest.12.inc':
        case 'EndFileNewlineUnitTest.13.inc':
            return [1 => 1];
        default:
            return [];
        }//end switch

    }//end getErrorList()


    /**
     * Returns the lines where warnings should occur.
     *
     * The key of the array should represent the line number and the value
     * should represent the number of warnings that should occur on that line.
     *
     * @param string $testFile The name of the file being tested.
     *
     * @return array<int, int>
     */
    public function getWarningList($testFile='')
    {
        return [];

    }//end getWarningList()


}//end class

Directory Contents

Dirs: 0 × Files: 37

Name Size Perms Modified Actions
53 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
51 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
65 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
81 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
27 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
26 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
55 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
53 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
134 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
133 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
42 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
40 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.71 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
19 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
18 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
18 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
17 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
18 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
29 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
47 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
19 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
20 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
35 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
18 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
18 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
17 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
18 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
19 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
18 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
10 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
11 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
12 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
13 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
14 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
10 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
13 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.98 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).