PHP 8.2.31
Preview: DisallowTabIndentUnitTest.php Size: 3.84 KB
//opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.php

<?php
/**
 * Unit test class for the DisallowTabIndent 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\Generic\Tests\WhiteSpace;

use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;

/**
 * Unit test class for the DisallowTabIndent sniff.
 *
 * @covers \PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\DisallowTabIndentSniff
 */
final class DisallowTabIndentUnitTest extends AbstractSniffUnitTest
{


    /**
     * Get a list of CLI values to set before the file is tested.
     *
     * @param string                  $testFile The name of the file being tested.
     * @param \PHP_CodeSniffer\Config $config   The config data for the test run.
     *
     * @return void
     */
    public function setCliValues($testFile, $config)
    {
        $config->tabWidth = 4;

    }//end setCliValues()


    /**
     * 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 'DisallowTabIndentUnitTest.1.inc':
            return [
                5   => 2,
                9   => 1,
                15  => 1,
                20  => 2,
                21  => 1,
                22  => 2,
                23  => 1,
                24  => 2,
                31  => 1,
                32  => 2,
                33  => 2,
                41  => 1,
                42  => 1,
                43  => 1,
                44  => 1,
                45  => 1,
                46  => 1,
                47  => 1,
                48  => 1,
                54  => 1,
                55  => 1,
                56  => 1,
                57  => 1,
                58  => 1,
                59  => 1,
                79  => 1,
                80  => 1,
                81  => 1,
                82  => 1,
                83  => 1,
                85  => 1,
                86  => 1,
                87  => 1,
                89  => 1,
                90  => 1,
                92  => 1,
                93  => 1,
                97  => 1,
                100 => 1,
            ];

        case 'DisallowTabIndentUnitTest.2.inc':
            return [
                6  => 1,
                7  => 1,
                8  => 1,
                9  => 1,
                10 => 1,
                11 => 1,
                12 => 1,
                13 => 1,
                19 => 1,
            ];

        case 'DisallowTabIndentUnitTest.3.inc':
            if (PHP_VERSION_ID >= 70300) {
                return [
                    7  => 1,
                    13 => 1,
                ];
            }

            // PHP 7.2 or lower: PHP version which doesn't support flexible heredocs/nowdocs yet.
            return [];

        case 'DisallowTabIndentUnitTest.js':
            return [
                3 => 1,
                5 => 1,
                6 => 1,
            ];

        case 'DisallowTabIndentUnitTest.css':
            return [
                1 => 1,
                2 => 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.
     *
     * @return array<int, int>
     */
    public function getWarningList()
    {
        return [];

    }//end getWarningList()


}//end class

Directory Contents

Dirs: 0 × Files: 52

Name Size Perms Modified Actions
4.52 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
4.44 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
122 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.74 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.32 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.20 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.32 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.20 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
202 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
175 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
125 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
61 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
58 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
72 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
69 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
3.72 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.70 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.86 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
202 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
253 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
83 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
62 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
68 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
74 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
79 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
3.84 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
233 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
215 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.46 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
548 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
523 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
141 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
127 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.17 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.81 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.75 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
98 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.61 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
26.40 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
26.52 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
3.84 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
3.88 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
19.64 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
19.62 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
563 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
556 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
5.32 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.45 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.42 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
109 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.87 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download

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