Completed
Pull Request — develop (#1492)
by Zack
33:18 queued 12:17
created
php_codesniffer/src/Standards/Generic/Tests/Files/LineEndingsUnitTest.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -15,49 +15,49 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Get a list of CLI values to set before the file is tested.
20
-     *
21
-     * @param string                  $testFile The name of the file being tested.
22
-     * @param \PHP_CodeSniffer\Config $config   The config data for the test run.
23
-     *
24
-     * @return void
25
-     */
26
-    public function setCliValues($testFile, $config)
27
-    {
28
-        $config->tabWidth = 4;
29
-
30
-    }//end setCliValues()
31
-
32
-
33
-    /**
34
-     * Returns the lines where errors should occur.
35
-     *
36
-     * The key of the array should represent the line number and the value
37
-     * should represent the number of errors that should occur on that line.
38
-     *
39
-     * @return array<int, int>
40
-     */
41
-    public function getErrorList()
42
-    {
43
-        return [1 => 1];
44
-
45
-    }//end getErrorList()
46
-
47
-
48
-    /**
49
-     * Returns the lines where warnings should occur.
50
-     *
51
-     * The key of the array should represent the line number and the value
52
-     * should represent the number of warnings that should occur on that line.
53
-     *
54
-     * @return array<int, int>
55
-     */
56
-    public function getWarningList()
57
-    {
58
-        return [];
59
-
60
-    }//end getWarningList()
18
+	/**
19
+	 * Get a list of CLI values to set before the file is tested.
20
+	 *
21
+	 * @param string                  $testFile The name of the file being tested.
22
+	 * @param \PHP_CodeSniffer\Config $config   The config data for the test run.
23
+	 *
24
+	 * @return void
25
+	 */
26
+	public function setCliValues($testFile, $config)
27
+	{
28
+		$config->tabWidth = 4;
29
+
30
+	}//end setCliValues()
31
+
32
+
33
+	/**
34
+	 * Returns the lines where errors should occur.
35
+	 *
36
+	 * The key of the array should represent the line number and the value
37
+	 * should represent the number of errors that should occur on that line.
38
+	 *
39
+	 * @return array<int, int>
40
+	 */
41
+	public function getErrorList()
42
+	{
43
+		return [1 => 1];
44
+
45
+	}//end getErrorList()
46
+
47
+
48
+	/**
49
+	 * Returns the lines where warnings should occur.
50
+	 *
51
+	 * The key of the array should represent the line number and the value
52
+	 * should represent the number of warnings that should occur on that line.
53
+	 *
54
+	 * @return array<int, int>
55
+	 */
56
+	public function getWarningList()
57
+	{
58
+		return [];
59
+
60
+	}//end getWarningList()
61 61
 
62 62
 
63 63
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Files/EndFileNoNewlineUnitTest.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -15,50 +15,50 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @param string $testFile The name of the file being tested.
25
-     *
26
-     * @return array<int, int>
27
-     */
28
-    public function getErrorList($testFile='')
29
-    {
30
-        switch ($testFile) {
31
-        case 'EndFileNoNewlineUnitTest.1.inc':
32
-        case 'EndFileNoNewlineUnitTest.1.css':
33
-        case 'EndFileNoNewlineUnitTest.1.js':
34
-        case 'EndFileNoNewlineUnitTest.2.inc':
35
-            return [3 => 1];
36
-        case 'EndFileNoNewlineUnitTest.2.css':
37
-        case 'EndFileNoNewlineUnitTest.2.js':
38
-        case 'EndFileNoNewlineUnitTest.6.inc':
39
-            return [2 => 1];
40
-        default:
41
-            return [];
42
-        }//end switch
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @param string $testFile The name of the file being tested.
25
+	 *
26
+	 * @return array<int, int>
27
+	 */
28
+	public function getErrorList($testFile='')
29
+	{
30
+		switch ($testFile) {
31
+		case 'EndFileNoNewlineUnitTest.1.inc':
32
+		case 'EndFileNoNewlineUnitTest.1.css':
33
+		case 'EndFileNoNewlineUnitTest.1.js':
34
+		case 'EndFileNoNewlineUnitTest.2.inc':
35
+			return [3 => 1];
36
+		case 'EndFileNoNewlineUnitTest.2.css':
37
+		case 'EndFileNoNewlineUnitTest.2.js':
38
+		case 'EndFileNoNewlineUnitTest.6.inc':
39
+			return [2 => 1];
40
+		default:
41
+			return [];
42
+		}//end switch
43 43
 
44
-    }//end getErrorList()
44
+	}//end getErrorList()
45 45
 
46 46
 
47
-    /**
48
-     * Returns the lines where warnings should occur.
49
-     *
50
-     * The key of the array should represent the line number and the value
51
-     * should represent the number of warnings that should occur on that line.
52
-     *
53
-     * @param string $testFile The name of the file being tested.
54
-     *
55
-     * @return array<int, int>
56
-     */
57
-    public function getWarningList($testFile='')
58
-    {
59
-        return [];
47
+	/**
48
+	 * Returns the lines where warnings should occur.
49
+	 *
50
+	 * The key of the array should represent the line number and the value
51
+	 * should represent the number of warnings that should occur on that line.
52
+	 *
53
+	 * @param string $testFile The name of the file being tested.
54
+	 *
55
+	 * @return array<int, int>
56
+	 */
57
+	public function getWarningList($testFile='')
58
+	{
59
+		return [];
60 60
 
61
-    }//end getWarningList()
61
+	}//end getWarningList()
62 62
 
63 63
 
64 64
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Files/OneTraitPerFileUnitTest.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -15,37 +15,37 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @return array(int => int)
25
-     */
26
-    public function getErrorList()
27
-    {
28
-        return [
29
-            6  => 1,
30
-            10 => 1,
31
-        ];
32
-
33
-    }//end getErrorList()
34
-
35
-
36
-    /**
37
-     * Returns the lines where warnings should occur.
38
-     *
39
-     * The key of the array should represent the line number and the value
40
-     * should represent the number of warnings that should occur on that line.
41
-     *
42
-     * @return array(int => int)
43
-     */
44
-    public function getWarningList()
45
-    {
46
-        return [];
47
-
48
-    }//end getWarningList()
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @return array(int => int)
25
+	 */
26
+	public function getErrorList()
27
+	{
28
+		return [
29
+			6  => 1,
30
+			10 => 1,
31
+		];
32
+
33
+	}//end getErrorList()
34
+
35
+
36
+	/**
37
+	 * Returns the lines where warnings should occur.
38
+	 *
39
+	 * The key of the array should represent the line number and the value
40
+	 * should represent the number of warnings that should occur on that line.
41
+	 *
42
+	 * @return array(int => int)
43
+	 */
44
+	public function getWarningList()
45
+	{
46
+		return [];
47
+
48
+	}//end getWarningList()
49 49
 
50 50
 
51 51
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -15,46 +15,46 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @param string $testFile The name of the file being tested.
25
-     *
26
-     * @return array<int, int>
27
-     */
28
-    public function getErrorList($testFile='')
29
-    {
30
-        switch ($testFile) {
31
-        case 'EndFileNewlineUnitTest.3.inc':
32
-        case 'EndFileNewlineUnitTest.3.js':
33
-        case 'EndFileNewlineUnitTest.3.css':
34
-        case 'EndFileNewlineUnitTest.4.inc':
35
-            return [2 => 1];
36
-        default:
37
-            return [];
38
-        }//end switch
39
-
40
-    }//end getErrorList()
41
-
42
-
43
-    /**
44
-     * Returns the lines where warnings should occur.
45
-     *
46
-     * The key of the array should represent the line number and the value
47
-     * should represent the number of warnings that should occur on that line.
48
-     *
49
-     * @param string $testFile The name of the file being tested.
50
-     *
51
-     * @return array<int, int>
52
-     */
53
-    public function getWarningList($testFile='')
54
-    {
55
-        return [];
56
-
57
-    }//end getWarningList()
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @param string $testFile The name of the file being tested.
25
+	 *
26
+	 * @return array<int, int>
27
+	 */
28
+	public function getErrorList($testFile='')
29
+	{
30
+		switch ($testFile) {
31
+		case 'EndFileNewlineUnitTest.3.inc':
32
+		case 'EndFileNewlineUnitTest.3.js':
33
+		case 'EndFileNewlineUnitTest.3.css':
34
+		case 'EndFileNewlineUnitTest.4.inc':
35
+			return [2 => 1];
36
+		default:
37
+			return [];
38
+		}//end switch
39
+
40
+	}//end getErrorList()
41
+
42
+
43
+	/**
44
+	 * Returns the lines where warnings should occur.
45
+	 *
46
+	 * The key of the array should represent the line number and the value
47
+	 * should represent the number of warnings that should occur on that line.
48
+	 *
49
+	 * @param string $testFile The name of the file being tested.
50
+	 *
51
+	 * @return array<int, int>
52
+	 */
53
+	public function getWarningList($testFile='')
54
+	{
55
+		return [];
56
+
57
+	}//end getWarningList()
58 58
 
59 59
 
60 60
 }//end class
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.1.inc 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@  discard block
 block discarded – undo
2 2
 
3 3
 // This line is okay... just!
4 4
 if (($reallyLongVarName === true) || (is_array($anotherLongVarName) == false)) {
5
-    // Do something.
5
+	// Do something.
6 6
 }
7 7
 
8 8
 // This line is not okay... just!
9 9
 if (($reallyLongVarName === true) || (is_array($anotherLongVarName) === false)) {
10
-    // Do something.
10
+	// Do something.
11 11
 }
12 12
 
13 13
 
14 14
 // This line is is too long.
15 15
 if (($anotherReallyLongVarName === true) || (is_array($anotherReallyLongVarName) === false)) {
16
-    // Do something.
16
+	// Do something.
17 17
 }
18 18
 
19 19
 // This is a really really long comment that is going to go to exactly 80 chars.
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 # http://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval
58 58
 
59 59
 if ($foo) {
60
-    if ($bar) {
61
-        if ($baz) {
62
-            // Next line can be broken:
63
-            // foo bar baz http://en.wikipedia.org/wiki/Binomial_proportion#blahblahblahblah
64
-            // But this one is just too long to break with this indent:
65
-            // foo bar baz http://en.wikipedia.org/wiki/Binomial_proportion#blahblahblahblahblah
66
-        }
67
-    }
60
+	if ($bar) {
61
+		if ($baz) {
62
+			// Next line can be broken:
63
+			// foo bar baz http://en.wikipedia.org/wiki/Binomial_proportion#blahblahblahblah
64
+			// But this one is just too long to break with this indent:
65
+			// foo bar baz http://en.wikipedia.org/wiki/Binomial_proportion#blahblahblahblahblah
66
+		}
67
+	}
68 68
 }
69 69
 
70 70
 /* -------------------------------- 80 chars -------------------------------- */
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.inc 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,6 +16,6 @@
 block discarded – undo
16 16
 $code = '<'.'?php ';
17 17
 
18 18
 $string = 'This is a really long string. '
19
-        . 'It is being used for errors. '
20
-        . 'The message is not translated.';
19
+		. 'It is being used for errors. '
20
+		. 'The message is not translated.';
21 21
 ?>
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -15,59 +15,59 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @param string $testFile The name of the file being tested.
25
-     *
26
-     * @return array<int, int>
27
-     */
28
-    public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc')
29
-    {
30
-        switch ($testFile) {
31
-        case 'UnnecessaryStringConcatUnitTest.inc':
32
-            return [
33
-                2  => 1,
34
-                6  => 1,
35
-                9  => 1,
36
-                12 => 1,
37
-                19 => 1,
38
-                20 => 1,
39
-            ];
40
-            break;
41
-        case 'UnnecessaryStringConcatUnitTest.js':
42
-            return [
43
-                1  => 1,
44
-                8  => 1,
45
-                11 => 1,
46
-                14 => 1,
47
-                15 => 1,
48
-            ];
49
-            break;
50
-        default:
51
-            return [];
52
-            break;
53
-        }//end switch
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @param string $testFile The name of the file being tested.
25
+	 *
26
+	 * @return array<int, int>
27
+	 */
28
+	public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc')
29
+	{
30
+		switch ($testFile) {
31
+		case 'UnnecessaryStringConcatUnitTest.inc':
32
+			return [
33
+				2  => 1,
34
+				6  => 1,
35
+				9  => 1,
36
+				12 => 1,
37
+				19 => 1,
38
+				20 => 1,
39
+			];
40
+			break;
41
+		case 'UnnecessaryStringConcatUnitTest.js':
42
+			return [
43
+				1  => 1,
44
+				8  => 1,
45
+				11 => 1,
46
+				14 => 1,
47
+				15 => 1,
48
+			];
49
+			break;
50
+		default:
51
+			return [];
52
+			break;
53
+		}//end switch
54 54
 
55
-    }//end getErrorList()
55
+	}//end getErrorList()
56 56
 
57 57
 
58
-    /**
59
-     * Returns the lines where warnings should occur.
60
-     *
61
-     * The key of the array should represent the line number and the value
62
-     * should represent the number of warnings that should occur on that line.
63
-     *
64
-     * @return array<int, int>
65
-     */
66
-    public function getWarningList()
67
-    {
68
-        return [];
58
+	/**
59
+	 * Returns the lines where warnings should occur.
60
+	 *
61
+	 * The key of the array should represent the line number and the value
62
+	 * should represent the number of warnings that should occur on that line.
63
+	 *
64
+	 * @return array<int, int>
65
+	 */
66
+	public function getWarningList()
67
+	{
68
+		return [];
69 69
 
70
-    }//end getWarningList()
70
+	}//end getWarningList()
71 71
 
72 72
 
73 73
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -15,37 +15,37 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @return array<int, int>
25
-     */
26
-    public function getErrorList()
27
-    {
28
-        return [116 => 1];
29
-
30
-    }//end getErrorList()
31
-
32
-
33
-    /**
34
-     * Returns the lines where warnings should occur.
35
-     *
36
-     * The key of the array should represent the line number and the value
37
-     * should represent the number of warnings that should occur on that line.
38
-     *
39
-     * @return array<int, int>
40
-     */
41
-    public function getWarningList()
42
-    {
43
-        return [
44
-            45 => 1,
45
-            72 => 1,
46
-        ];
47
-
48
-    }//end getWarningList()
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @return array<int, int>
25
+	 */
26
+	public function getErrorList()
27
+	{
28
+		return [116 => 1];
29
+
30
+	}//end getErrorList()
31
+
32
+
33
+	/**
34
+	 * Returns the lines where warnings should occur.
35
+	 *
36
+	 * The key of the array should represent the line number and the value
37
+	 * should represent the number of warnings that should occur on that line.
38
+	 *
39
+	 * @return array<int, int>
40
+	 */
41
+	public function getWarningList()
42
+	{
43
+		return [
44
+			45 => 1,
45
+			72 => 1,
46
+		];
47
+
48
+	}//end getWarningList()
49 49
 
50 50
 
51 51
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.inc 1 patch
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -2,101 +2,101 @@
 block discarded – undo
2 2
 
3 3
 function nestingOne()
4 4
 {
5
-    if ($condition) {
6
-        echo 'hi';
7
-    }
5
+	if ($condition) {
6
+		echo 'hi';
7
+	}
8 8
 }
9 9
 
10 10
 function nestingFive()
11 11
 {
12
-    if ($condition) {
13
-        echo 'hi';
14
-        switch ($condition)
15
-        {
16
-            case '1':
17
-                if ($condition === '1') {
18
-                    if ($cond) {
19
-                        echo 'hi';
20
-                    }
21
-                }
22
-            break;
23
-        }
24
-    }
12
+	if ($condition) {
13
+		echo 'hi';
14
+		switch ($condition)
15
+		{
16
+			case '1':
17
+				if ($condition === '1') {
18
+					if ($cond) {
19
+						echo 'hi';
20
+					}
21
+				}
22
+			break;
23
+		}
24
+	}
25 25
 }
26 26
 
27 27
 function nestingSix()
28 28
 {
29
-    if ($condition) {
30
-        echo 'hi';
31
-        switch ($condition)
32
-        {
33
-            case '1':
34
-                if ($condition === '1') {
35
-                    if ($cond) {
36
-                        foreach ($conds as $cond) {
37
-                            echo 'hi';
38
-                        }
39
-                    }
40
-                }
41
-            break;
42
-        }
43
-    }
29
+	if ($condition) {
30
+		echo 'hi';
31
+		switch ($condition)
32
+		{
33
+			case '1':
34
+				if ($condition === '1') {
35
+					if ($cond) {
36
+						foreach ($conds as $cond) {
37
+							echo 'hi';
38
+						}
39
+					}
40
+				}
41
+			break;
42
+		}
43
+	}
44 44
 }
45 45
 
46 46
 function nestingTen()
47 47
 {
48
-    if ($condition) {
49
-        echo 'hi';
50
-        switch ($condition)
51
-        {
52
-            case '1':
53
-                if ($condition === '1') {
54
-                    if ($cond) {
55
-                        switch ($cond) {
56
-                            case '1':
57
-                                if ($cond === '1') {
58
-                                    foreach ($conds as $cond) {
59
-                                        if ($cond === 'hi') {
60
-                                            echo 'hi';
61
-                                        }
62
-                                    }
63
-                                }
64
-                            break;
65
-                        }
66
-                    }
67
-                }
68
-            break;
69
-        }
70
-    }
48
+	if ($condition) {
49
+		echo 'hi';
50
+		switch ($condition)
51
+		{
52
+			case '1':
53
+				if ($condition === '1') {
54
+					if ($cond) {
55
+						switch ($cond) {
56
+							case '1':
57
+								if ($cond === '1') {
58
+									foreach ($conds as $cond) {
59
+										if ($cond === 'hi') {
60
+											echo 'hi';
61
+										}
62
+									}
63
+								}
64
+							break;
65
+						}
66
+					}
67
+				}
68
+			break;
69
+		}
70
+	}
71 71
 }
72 72
 
73 73
 function nestingEleven()
74 74
 {
75
-    if ($condition) {
76
-        echo 'hi';
77
-        switch ($condition)
78
-        {
79
-            case '1':
80
-                if ($condition === '1') {
81
-                    if ($cond) {
82
-                        switch ($cond) {
83
-                            case '1':
84
-                                if ($cond === '1') {
85
-                                    foreach ($conds as $cond) {
86
-                                        if ($cond === 'hi') {
87
-                                            if ($cond !== 'bye') {
88
-                                                echo 'hi';
89
-                                            }
90
-                                        }
91
-                                    }
92
-                                }
93
-                            break;
94
-                        }
95
-                    }
96
-                }
97
-            break;
98
-        }
99
-    }
75
+	if ($condition) {
76
+		echo 'hi';
77
+		switch ($condition)
78
+		{
79
+			case '1':
80
+				if ($condition === '1') {
81
+					if ($cond) {
82
+						switch ($cond) {
83
+							case '1':
84
+								if ($cond === '1') {
85
+									foreach ($conds as $cond) {
86
+										if ($cond === 'hi') {
87
+											if ($cond !== 'bye') {
88
+												echo 'hi';
89
+											}
90
+										}
91
+									}
92
+								}
93
+							break;
94
+						}
95
+					}
96
+				}
97
+			break;
98
+		}
99
+	}
100 100
 }
101 101
 
102 102
 ?>
Please login to merge, or discard this patch.