Completed
Pull Request — develop (#1492)
by Zack
28:58 queued 09:00
created
php_codesniffer/src/Standards/Generic/Tests/Files/LineLengthUnitTest.1.inc 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,11 +68,16 @@
 block discarded – undo
68 68
 }
69 69
 
70 70
 /* -------------------------------- 80 chars -------------------------------- */
71
-$ab	= function () { /* comment */ if ($foo === true) { return (int) $foo; } };
72
-$ab	= function ()	{ /* comment */ if ($foo === true){ return	(int)$foo; }};
73
-$ab	= function ()	{ /* comment */ if ($foo === true) { return	(int) $foo; }  };
74
-	$ab	= function () { /* comment */ if ($foo === true) { return(int) $foo; }};
75
-	$ab	= function () { /* comment */ if ($foo === true) {	return(int) $foo; }};
71
+$ab	= function () {
72
+/* comment */ if ($foo === true) { return (int) $foo; } };
73
+$ab	= function () {
74
+/* comment */ if ($foo === true){ return	(int)$foo; }};
75
+$ab	= function () {
76
+/* comment */ if ($foo === true) { return	(int) $foo; }  };
77
+	$ab	= function () {
78
+/* comment */ if ($foo === true) { return(int) $foo; }};
79
+	$ab	= function () {
80
+/* comment */ if ($foo === true) {	return(int) $foo; }};
76 81
 $ab	=  	$ab	=  	$ab	=  	$ab	=  	$ab	=  	$ab	=  	$ab	=  	$ab	=  	$ab	=  	$ab;
77 82
 
78 83
 // PHPCS annotations on a line by themselves should be ignored for the metrics.
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Strings/UnnecessaryStringConcatUnitTest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class UnnecessaryStringConcatUnitTest extends AbstractSniffUnitTest
15
-{
14
+class UnnecessaryStringConcatUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -25,8 +24,7 @@  discard block
 block discarded – undo
25 24
      *
26 25
      * @return array<int, int>
27 26
      */
28
-    public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc')
29
-    {
27
+    public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc') {
30 28
         switch ($testFile) {
31 29
         case 'UnnecessaryStringConcatUnitTest.inc':
32 30
             return [
@@ -63,8 +61,7 @@  discard block
 block discarded – undo
63 61
      *
64 62
      * @return array<int, int>
65 63
      */
66
-    public function getWarningList()
67
-    {
64
+    public function getWarningList() {
68 65
         return [];
69 66
 
70 67
     }//end getWarningList()
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class CyclomaticComplexityUnitTest extends AbstractSniffUnitTest
15
-{
14
+class CyclomaticComplexityUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      *
24 23
      * @return array<int, int>
25 24
      */
26
-    public function getErrorList()
27
-    {
25
+    public function getErrorList() {
28 26
         return [116 => 1];
29 27
 
30 28
     }//end getErrorList()
@@ -38,8 +36,7 @@  discard block
 block discarded – undo
38 36
      *
39 37
      * @return array<int, int>
40 38
      */
41
-    public function getWarningList()
42
-    {
39
+    public function getWarningList() {
43 40
         return [
44 41
             45 => 1,
45 42
             72 => 1,
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.inc 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,18 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function nestingOne()
4
-{
3
+function nestingOne() {
5 4
     if ($condition) {
6 5
         echo 'hi';
7 6
     }
8 7
 }
9 8
 
10
-function nestingFive()
11
-{
9
+function nestingFive() {
12 10
     if ($condition) {
13 11
         echo 'hi';
14
-        switch ($condition)
15
-        {
12
+        switch ($condition) {
16 13
             case '1':
17 14
                 if ($condition === '1') {
18 15
                     if ($cond) {
@@ -24,12 +21,10 @@  discard block
 block discarded – undo
24 21
     }
25 22
 }
26 23
 
27
-function nestingSix()
28
-{
24
+function nestingSix() {
29 25
     if ($condition) {
30 26
         echo 'hi';
31
-        switch ($condition)
32
-        {
27
+        switch ($condition) {
33 28
             case '1':
34 29
                 if ($condition === '1') {
35 30
                     if ($cond) {
@@ -43,12 +38,10 @@  discard block
 block discarded – undo
43 38
     }
44 39
 }
45 40
 
46
-function nestingTen()
47
-{
41
+function nestingTen() {
48 42
     if ($condition) {
49 43
         echo 'hi';
50
-        switch ($condition)
51
-        {
44
+        switch ($condition) {
52 45
             case '1':
53 46
                 if ($condition === '1') {
54 47
                     if ($cond) {
@@ -70,12 +63,10 @@  discard block
 block discarded – undo
70 63
     }
71 64
 }
72 65
 
73
-function nestingEleven()
74
-{
66
+function nestingEleven() {
75 67
     if ($condition) {
76 68
         echo 'hi';
77
-        switch ($condition)
78
-        {
69
+        switch ($condition) {
79 70
             case '1':
80 71
                 if ($condition === '1') {
81 72
                     if ($cond) {
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Metrics/NestingLevelUnitTest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class NestingLevelUnitTest extends AbstractSniffUnitTest
15
-{
14
+class NestingLevelUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      *
24 23
      * @return array<int, int>
25 24
      */
26
-    public function getErrorList()
27
-    {
25
+    public function getErrorList() {
28 26
         return [73 => 1];
29 27
 
30 28
     }//end getErrorList()
@@ -38,8 +36,7 @@  discard block
 block discarded – undo
38 36
      *
39 37
      * @return array<int, int>
40 38
      */
41
-    public function getWarningList()
42
-    {
39
+    public function getWarningList() {
43 40
         return [
44 41
             27 => 1,
45 42
             46 => 1,
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Metrics/CyclomaticComplexityUnitTest.inc 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -2,8 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 function complexityOne() { }
4 4
 
5
-function complexityFive()
6
-{
5
+function complexityFive() {
7 6
     if ($condition) {
8 7
     }
9 8
 
@@ -17,8 +16,7 @@  discard block
 block discarded – undo
17 16
     }
18 17
 }
19 18
 
20
-function complexityTen()
21
-{
19
+function complexityTen() {
22 20
     while ($condition === true) {
23 21
         if ($condition) {
24 22
         }
@@ -42,8 +40,7 @@  discard block
 block discarded – undo
42 40
     }
43 41
 }
44 42
 
45
-function complexityEleven()
46
-{
43
+function complexityEleven() {
47 44
     while ($condition === true) {
48 45
         if ($condition) {
49 46
         } else if ($cond) {
@@ -69,8 +66,7 @@  discard block
 block discarded – undo
69 66
 }
70 67
 
71 68
 
72
-function complexityTwenty()
73
-{
69
+function complexityTwenty() {
74 70
     while ($condition === true) {
75 71
         if ($condition) {
76 72
         } else if ($cond) {
@@ -113,8 +109,7 @@  discard block
 block discarded – undo
113 109
 }
114 110
 
115 111
 
116
-function complexityTwentyOne()
117
-{
112
+function complexityTwentyOne() {
118 113
     while ($condition === true) {
119 114
         if ($condition) {
120 115
         } else if ($cond) {
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Tests/Commenting/FixmeUnitTest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
14 14
 
15
-class FixmeUnitTest extends AbstractSniffUnitTest
16
-{
15
+class FixmeUnitTest extends AbstractSniffUnitTest {
17 16
 
18 17
 
19 18
     /**
@@ -26,8 +25,7 @@  discard block
 block discarded – undo
26 25
      *
27 26
      * @return array<int, int>
28 27
      */
29
-    public function getErrorList($testFile='FixmeUnitTest.inc')
30
-    {
28
+    public function getErrorList($testFile='FixmeUnitTest.inc') {
31 29
         return [
32 30
             3  => 1,
33 31
             4  => 1,
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
      *
53 51
      * @return array<int, int>
54 52
      */
55
-    public function getWarningList($testFile='FixmeUnitTest.inc')
56
-    {
53
+    public function getWarningList($testFile='FixmeUnitTest.inc') {
57 54
         return [];
58 55
 
59 56
     }//end getWarningList()
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.inc 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -249,4 +249,3 @@
 block discarded – undo
249 249
  * @link		http://pear.php.net/package/PHP_CodeSniffer
250 250
  */
251 251
 
252
-/** No docblock close tag. Must be last test without new line.
253 252
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Commenting/DocCommentUnitTest.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class DocCommentUnitTest extends AbstractSniffUnitTest
15
-{
14
+class DocCommentUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      *
24 23
      * @return void
25 24
      */
26
-    public function setCliValues($testFile, $config)
27
-    {
25
+    public function setCliValues($testFile, $config) {
28 26
         $config->tabWidth = 4;
29 27
 
30 28
     }//end setCliValues()
@@ -38,8 +36,7 @@  discard block
 block discarded – undo
38 36
      *
39 37
      * @return array(int => int)
40 38
      */
41
-    public function getErrorList()
42
-    {
39
+    public function getErrorList() {
43 40
         return [
44 41
             14  => 1,
45 42
             16  => 1,
@@ -101,8 +98,7 @@  discard block
 block discarded – undo
101 98
      *
102 99
      * @return array(int => int)
103 100
      */
104
-    public function getWarningList()
105
-    {
101
+    public function getWarningList() {
106 102
         return [];
107 103
 
108 104
     }//end getWarningList()
Please login to merge, or discard this patch.