Completed
Push — master ( 8cd077 )
by Tomáš
09:25
created
src/Standards/Squiz/Tests/Commenting/FunctionCommentThrowTagUnitTest.inc 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      * @return array
240 240
      * @throws ChannelException If the project is invalid.
241 241
      */
242
-    public static function getTestInfo($projectid=NULL)
242
+    public static function getTestInfo($projectid = NULL)
243 243
     {
244 244
         try {
245 245
             DAL::beginTransaction();
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     {
265 265
         parent::setUp();
266 266
 
267
-        if ( !strlen($this->folderName) ) {
267
+        if (!strlen($this->folderName)) {
268 268
             throw new \RuntimeException('The $this->folderName must be specified before proceeding.');
269 269
         }
270 270
     }
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.inc 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -458,11 +458,11 @@  discard block
 block discarded – undo
458 458
  */
459 459
 function test($test)
460 460
 {
461
-   if ($test === TRUE) {
462
-       return;
463
-   }
461
+    if ($test === TRUE) {
462
+        return;
463
+    }
464 464
 
465
-   return $test;
465
+    return $test;
466 466
 
467 467
 }//end test()
468 468
 
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
  */
487 487
 function test(\other\ns\item $test)
488 488
 {
489
-   return $test;
489
+    return $test;
490 490
 
491 491
 }//end test()
492 492
 
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
  */
500 500
 function test(\other\ns\item $test)
501 501
 {
502
-   return $test;
502
+    return $test;
503 503
 
504 504
 }//end test()
505 505
 
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
  */
513 513
 function test(\first\ns\item $test = \second\ns::CONSTANT)
514 514
 {
515
-   return $test;
515
+    return $test;
516 516
 
517 517
 }//end test()
518 518
 
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
  */
526 526
 function test(\first\ns\item $test = \second\ns::CONSTANT)
527 527
 {
528
-   return $test;
528
+    return $test;
529 529
 
530 530
 }//end test()
531 531
 
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
  */
560 560
 function test($test)
561 561
 {
562
-   return $test;
562
+    return $test;
563 563
 
564 564
 }//end test()
565 565
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      * @return
15 15
      * @throws
16 16
      */
17
-    private function _functionCall($stackPtr, $depth=1, $index)
17
+    private function _functionCall($stackPtr, $depth = 1, $index)
18 18
     {
19 19
         return $stackPtr;
20 20
 
@@ -532,13 +532,13 @@  discard block
 block discarded – undo
532 532
 // Closures should be ignored.
533 533
 preg_replace_callback(
534 534
     '~-([a-z])~',
535
-    function ($match) {
535
+    function($match) {
536 536
         return strtoupper($match[1]);
537 537
     },
538 538
     'hello-world'
539 539
 );
540 540
 
541
-$callback = function ($bar) use ($foo)
541
+$callback = function($bar) use ($foo)
542 542
             {
543 543
                 $bar += $foo;
544 544
             };
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
  */
586 586
 public function containsClosure()
587 587
 {
588
-    function ($e) {
588
+    function($e) {
589 589
         return new Event($e);
590 590
     },
591 591
 
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
  *
727 727
  * @return void
728 728
  */
729
-public function myFunction (string $name1, int $name2, float $name3, bool $name4) {
729
+public function myFunction(string $name1, int $name2, float $name3, bool $name4) {
730 730
 }
731 731
 
732 732
 /**
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/BlockCommentUnitTest.inc 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,12 +84,12 @@
 block discarded – undo
84 84
     /**
85 85
        test
86 86
        here
87
-    **/
87
+     **/
88 88
     echo 'test';
89 89
     /**
90 90
         Test
91 91
         here
92
-       **/
92
+     **/
93 93
 
94 94
 }//end func()
95 95
 
Please login to merge, or discard this patch.
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -144,26 +144,26 @@
 block discarded – undo
144 144
 }
145 145
 
146 146
 switch ($var) {
147
-    case 'foo':
148
-        /*
147
+        case 'foo':
148
+            /*
149 149
             Foo comment.
150 150
             This is a multiple
151 151
             line comment for Foo.
152 152
         */
153 153
 
154
-        echo 'Foo';
155
-    break;
154
+            echo 'Foo';
155
+        break;
156 156
 
157
-    default:
157
+        default:
158 158
 
159
-        /*
159
+            /*
160 160
             Foo comment.
161 161
             This is a multiple
162 162
             line comment for Foo.
163 163
         */
164 164
 
165
-        echo 'Default';
166
-    break;
165
+            echo 'Default';
166
+        break;
167 167
 }//end switch
168 168
 
169 169
 /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
 /*
187 187
     Comment goes here
188 188
 */
189
-$two = (1 + 1);  // I'm not a comment closer!
189
+$two = (1 + 1); // I'm not a comment closer!
190 190
 
191 191
 class Foo
192 192
 {
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/FunctionCommentUnitTest.php 1 patch
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -40,78 +40,78 @@
 block discarded – undo
40 40
     public function getErrorList()
41 41
     {
42 42
         $errors = array(
43
-                   5   => 1,
44
-                   10  => 3,
45
-                   12  => 2,
46
-                   13  => 2,
47
-                   14  => 1,
48
-                   15  => 1,
49
-                   28  => 1,
50
-                   43  => 1,
51
-                   76  => 1,
52
-                   87  => 1,
53
-                   103 => 1,
54
-                   109 => 1,
55
-                   112 => 1,
56
-                   122 => 1,
57
-                   123 => 3,
58
-                   124 => 2,
59
-                   125 => 1,
60
-                   126 => 1,
61
-                   137 => 4,
62
-                   138 => 4,
63
-                   139 => 4,
64
-                   143 => 2,
65
-                   152 => 1,
66
-                   155 => 2,
67
-                   159 => 1,
68
-                   166 => 1,
69
-                   173 => 1,
70
-                   183 => 1,
71
-                   190 => 2,
72
-                   193 => 2,
73
-                   196 => 1,
74
-                   199 => 2,
75
-                   210 => 1,
76
-                   211 => 1,
77
-                   222 => 1,
78
-                   223 => 1,
79
-                   224 => 1,
80
-                   225 => 1,
81
-                   226 => 1,
82
-                   227 => 1,
83
-                   230 => 2,
84
-                   232 => 1,
85
-                   246 => 1,
86
-                   248 => 4,
87
-                   261 => 1,
88
-                   263 => 1,
89
-                   276 => 1,
90
-                   277 => 1,
91
-                   278 => 1,
92
-                   279 => 1,
93
-                   280 => 1,
94
-                   281 => 1,
95
-                   284 => 1,
96
-                   286 => 2,
97
-                   294 => 1,
98
-                   302 => 1,
99
-                   312 => 1,
100
-                   358 => 1,
101
-                   359 => 2,
102
-                   372 => 1,
103
-                   373 => 1,
104
-                   387 => 1,
105
-                   407 => 1,
106
-                   441 => 1,
107
-                   500 => 1,
108
-                   526 => 1,
109
-                   548 => 1,
110
-                   641 => 1,
111
-                   669 => 1,
112
-                   744 => 1,
113
-                   748 => 1,
114
-                  );
43
+                    5   => 1,
44
+                    10  => 3,
45
+                    12  => 2,
46
+                    13  => 2,
47
+                    14  => 1,
48
+                    15  => 1,
49
+                    28  => 1,
50
+                    43  => 1,
51
+                    76  => 1,
52
+                    87  => 1,
53
+                    103 => 1,
54
+                    109 => 1,
55
+                    112 => 1,
56
+                    122 => 1,
57
+                    123 => 3,
58
+                    124 => 2,
59
+                    125 => 1,
60
+                    126 => 1,
61
+                    137 => 4,
62
+                    138 => 4,
63
+                    139 => 4,
64
+                    143 => 2,
65
+                    152 => 1,
66
+                    155 => 2,
67
+                    159 => 1,
68
+                    166 => 1,
69
+                    173 => 1,
70
+                    183 => 1,
71
+                    190 => 2,
72
+                    193 => 2,
73
+                    196 => 1,
74
+                    199 => 2,
75
+                    210 => 1,
76
+                    211 => 1,
77
+                    222 => 1,
78
+                    223 => 1,
79
+                    224 => 1,
80
+                    225 => 1,
81
+                    226 => 1,
82
+                    227 => 1,
83
+                    230 => 2,
84
+                    232 => 1,
85
+                    246 => 1,
86
+                    248 => 4,
87
+                    261 => 1,
88
+                    263 => 1,
89
+                    276 => 1,
90
+                    277 => 1,
91
+                    278 => 1,
92
+                    279 => 1,
93
+                    280 => 1,
94
+                    281 => 1,
95
+                    284 => 1,
96
+                    286 => 2,
97
+                    294 => 1,
98
+                    302 => 1,
99
+                    312 => 1,
100
+                    358 => 1,
101
+                    359 => 2,
102
+                    372 => 1,
103
+                    373 => 1,
104
+                    387 => 1,
105
+                    407 => 1,
106
+                    441 => 1,
107
+                    500 => 1,
108
+                    526 => 1,
109
+                    548 => 1,
110
+                    641 => 1,
111
+                    669 => 1,
112
+                    744 => 1,
113
+                    748 => 1,
114
+                    );
115 115
 
116 116
         // The yield tests will only work in PHP versions where yield exists and
117 117
         // will throw errors in earlier versions.
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/ClassCommentUnitTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         return array(
46 46
                 73 => 1,
47
-               );
47
+                );
48 48
 
49 49
     }//end getErrorList()
50 50
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         return array(
63 63
                 27 => 1,
64 64
                 46 => 1,
65
-               );
65
+                );
66 66
 
67 67
     }//end getWarningList()
68 68
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.inc 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
      * @see otherFunctions()
13 13
      * @see anotherFunctions()
14 14
      */
15
-     public $variableName = array();
15
+        public $variableName = array();
16 16
 
17 17
 
18
-     // Not "/**" style comment.
19
-     //
20
-     // @var   string
21
-     private  $_incorrectCommentStyle = '';
18
+        // Not "/**" style comment.
19
+        //
20
+        // @var   string
21
+        private  $_incorrectCommentStyle = '';
22 22
 
23 23
 
24
-     protected $noComment = '';
24
+        protected $noComment = '';
25 25
 
26 26
 
27 27
     /**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @var string
32 32
      */
33
-     public $extraNewlineBeforeShort = '';
33
+        public $extraNewlineBeforeShort = '';
34 34
 
35 35
 
36 36
     /**
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      *
43 43
      * @var string
44 44
      */
45
-     private $_extraNewlineBetween = '';
45
+        private $_extraNewlineBetween = '';
46 46
 
47 47
 
48 48
     /**
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
      * @var string
56 56
      * @var array
57 57
      */
58
-     protected $extraNewlineBeforeTags = '';
58
+        protected $extraNewlineBeforeTags = '';
59 59
 
60 60
 
61 61
     /**
62 62
      * No newline before tags, var tag missing.
63 63
      * @see otherFunctions()
64 64
      */
65
-     protected $noNewlineBeforeTags = '';
65
+        protected $noNewlineBeforeTags = '';
66 66
 
67 67
 
68 68
     /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      *
73 73
      * @var
74 74
      */
75
-     public $singleLineFullStopShortComment = '';
75
+        public $singleLineFullStopShortComment = '';
76 76
 
77 77
 
78 78
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * @see anotherFunctions()
84 84
      * @see
85 85
      */
86
-     public $singleLineFullStopShortComment = '';
86
+        public $singleLineFullStopShortComment = '';
87 87
 
88 88
 
89 89
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * @var     string
93 93
      * @summary unknown tag
94 94
      */
95
-     public $missingSinceTag = '';
95
+        public $missingSinceTag = '';
96 96
 
97 97
 
98 98
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      *
101 101
      * @var string
102 102
      */
103
-     $variableCheck = '';
103
+        $variableCheck = '';
104 104
 
105 105
 
106 106
     /**
@@ -129,38 +129,38 @@  discard block
 block discarded – undo
129 129
      *
130 130
      *
131 131
      */
132
-     $emptyVarDoc = '';
132
+        $emptyVarDoc = '';
133 133
 
134
-     /**
135
-     * Var type checking (int v.s. integer).
136
-     *
137
-     * @var int
138
-     */
139
-     private $_varSimpleTypeCheck;
134
+        /**
135
+         * Var type checking (int v.s. integer).
136
+         *
137
+         * @var int
138
+         */
139
+        private $_varSimpleTypeCheck;
140 140
 
141 141
 
142
-     /**
143
-     * Var type checking (array(int => string) v.s. array(int => string)).
144
-     *
145
-     * @var array(int => string)
146
-     */
147
-     private $_varArrayTypeCheck;
142
+        /**
143
+         * Var type checking (array(int => string) v.s. array(int => string)).
144
+         *
145
+         * @var array(int => string)
146
+         */
147
+        private $_varArrayTypeCheck;
148 148
 
149 149
 
150
-     /**
151
-     * Var type checking (STRING v.s. string).
152
-     *
153
-     * @var STRING
154
-     */
155
-     private $_varCaseTypeCheck;
150
+        /**
151
+         * Var type checking (STRING v.s. string).
152
+         *
153
+         * @var STRING
154
+         */
155
+        private $_varCaseTypeCheck;
156 156
 
157 157
 
158 158
     /**
159 159
      * @var integer
160 160
      */
161
-     private $_varWithNoShortComment;
161
+        private $_varWithNoShortComment;
162 162
 
163
-     protected $noComment2 = '';
163
+        protected $noComment2 = '';
164 164
 
165 165
 
166 166
 }//end class
@@ -175,21 +175,21 @@  discard block
 block discarded – undo
175 175
 class VariableCommentUnitTest2
176 176
 {
177 177
 
178
-   public $hello;
178
+    public $hello;
179 179
 
180 180
     /** Comment starts here.
181 181
      *
182 182
      * @var string
183 183
      *
184 184
      */
185
-     private $_varCaseTypeCheck;
186
-
187
-     /**
188
-      * 这是一条测试评论.
189
-      *
190
-      * @var string
191
-      */
192
-     public $foo;
185
+        private $_varCaseTypeCheck;
186
+
187
+        /**
188
+         * 这是一条测试评论.
189
+         *
190
+         * @var string
191
+         */
192
+        public $foo;
193 193
 
194 194
 }//end class
195 195
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/VariableCommentUnitTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/ClosingDeclarationCommentUnitTest.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 }//end class
73 73
 
74 74
 // Closures don't need end comments.
75
-echo preg_replace_callback('~-([a-z])~', function ($match) { return strtoupper($match[1]); }, 'hello-world');
75
+echo preg_replace_callback('~-([a-z])~', function($match) { return strtoupper($match[1]); }, 'hello-world');
76 76
 
77 77
 class TestClass
78 78
 {
Please login to merge, or discard this patch.
src/Standards/Squiz/Tests/Commenting/FileCommentUnitTest.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         case 'CharacterBeforePHPOpeningTagUnitTest.1.inc':
47 47
             return array(
48 48
                     2 => 1,
49
-                   );
49
+                    );
50 50
             break;
51 51
         default:
52 52
             return array();
Please login to merge, or discard this patch.
Switch Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -53,21 +53,21 @@
 block discarded – undo
53 53
     public function getErrorList($testFile='FileCommentUnitTest.inc')
54 54
     {
55 55
         switch ($testFile) {
56
-        case 'FileCommentUnitTest.inc':
57
-        case 'FileCommentUnitTest.js':
58
-            return array(
59
-                    1  => 1,
60
-                    22 => 2,
61
-                    23 => 1,
62
-                    24 => 2,
63
-                    25 => 2,
64
-                    26 => 1,
65
-                    27 => 2,
66
-                    28 => 2,
67
-                    32 => 2,
68
-                   );
69
-        default:
70
-            return array();
56
+            case 'FileCommentUnitTest.inc':
57
+            case 'FileCommentUnitTest.js':
58
+                return array(
59
+                        1  => 1,
60
+                        22 => 2,
61
+                        23 => 1,
62
+                        24 => 2,
63
+                        25 => 2,
64
+                        26 => 1,
65
+                        27 => 2,
66
+                        28 => 2,
67
+                        32 => 2,
68
+                       );
69
+            default:
70
+                return array();
71 71
         }
72 72
 
73 73
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      *
51 51
      * @return array<int, int>
52 52
      */
53
-    public function getErrorList($testFile='FileCommentUnitTest.inc')
53
+    public function getErrorList($testFile = 'FileCommentUnitTest.inc')
54 54
     {
55 55
         switch ($testFile) {
56 56
         case 'FileCommentUnitTest.inc':
Please login to merge, or discard this patch.