Completed
Push — master ( d63611...7faa1d )
by Nikita
03:50
created
grammar/analyze.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -20,10 +20,16 @@
 block discarded – undo
20 20
     'case_separator', 'optional_comma'
21 21
 ));
22 22
 
23
+/**
24
+ * @param string $regex
25
+ */
23 26
 function regex($regex) {
24 27
     return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~';
25 28
 }
26 29
 
30
+/**
31
+ * @param string $regex
32
+ */
27 33
 function magicSplit($regex, $string) {
28 34
     $pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string);
29 35
 
Please login to merge, or discard this patch.
grammar/rebuildParsers.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -175,6 +175,9 @@  discard block
 block discarded – undo
175 175
     );
176 176
 }
177 177
 
178
+/**
179
+ * @param integer $num
180
+ */
178 181
 function assertArgs($num, $args, $name) {
179 182
     if ($num != count($args)) {
180 183
         die('Wrong argument count for ' . $name . '().');
@@ -203,10 +206,16 @@  discard block
 block discarded – undo
203 206
 /// Regex helper functions ///
204 207
 //////////////////////////////
205 208
 
209
+/**
210
+ * @param string $regex
211
+ */
206 212
 function regex($regex) {
207 213
     return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~';
208 214
 }
209 215
 
216
+/**
217
+ * @param string $regex
218
+ */
210 219
 function magicSplit($regex, $string) {
211 220
     $pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string);
212 221
 
Please login to merge, or discard this patch.
lib/PhpParser/NodeVisitor/NameResolver.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -110,6 +110,9 @@
 block discarded – undo
110 110
         );
111 111
     }
112 112
 
113
+    /**
114
+     * @param Name $type
115
+     */
113 116
     protected function addAlias(Stmt\UseUse $use, $type, Name $prefix = null) {
114 117
         // Add prefix for group uses
115 118
         $name = $prefix ? Name::concat($prefix, $use->name) : $use->name;
Please login to merge, or discard this patch.
lib/PhpParser/Parser/Multiple.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -51,6 +51,9 @@
 block discarded – undo
51 51
         return $this->errors;
52 52
     }
53 53
 
54
+    /**
55
+     * @param string $code
56
+     */
54 57
     private function tryParse(Parser $parser, $code) {
55 58
         $stmts = null;
56 59
         $error = null;
Please login to merge, or discard this patch.
lib/PhpParser/PrettyPrinter/Standard.php 2 patches
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -534,6 +534,9 @@  discard block
 block discarded – undo
534 534
              . ($node->name->getLast() !== $node->alias ? ' as ' . $node->alias : '');
535 535
     }
536 536
 
537
+    /**
538
+     * @param integer $type
539
+     */
537 540
     private function pUseType($type) {
538 541
         return $type === Stmt\Use_::TYPE_FUNCTION ? 'function '
539 542
             : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : '');
@@ -744,6 +747,9 @@  discard block
 block discarded – undo
744 747
         return is_string($node) ? $node : $this->p($node);
745 748
     }
746 749
 
750
+    /**
751
+     * @param string $afterClassToken
752
+     */
747 753
     protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) {
748 754
         return $this->pModifiers($node->type)
749 755
         . 'class' . $afterClassToken
@@ -760,6 +766,9 @@  discard block
 block discarded – undo
760 766
         }
761 767
     }
762 768
 
769
+    /**
770
+     * @param integer $modifiers
771
+     */
763 772
     protected function pModifiers($modifiers) {
764 773
         return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC    ? 'public '    : '')
765 774
              . ($modifiers & Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '')
@@ -769,6 +778,9 @@  discard block
 block discarded – undo
769 778
              . ($modifiers & Stmt\Class_::MODIFIER_FINAL     ? 'final '     : '');
770 779
     }
771 780
 
781
+    /**
782
+     * @param string $quote
783
+     */
772 784
     protected function pEncapsList(array $encapsList, $quote) {
773 785
         $return = '';
774 786
         foreach ($encapsList as $element) {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
         return ($node->static ? 'static ' : '')
464 464
              . 'function ' . ($node->byRef ? '&' : '')
465 465
              . '(' . $this->pCommaSeparated($node->params) . ')'
466
-             . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')': '')
466
+             . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '')
467 467
              . (null !== $node->returnType ? ' : ' . $this->pType($node->returnType) : '')
468 468
              . ' {' . $this->pStmts($node->stmts) . "\n" . '}';
469 469
     }
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
         return (null !== $node->trait ? $this->p($node->trait) . '::' : '')
571 571
              . $node->method . ' as'
572 572
              . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '')
573
-             . (null !== $node->newName     ? ' ' . $node->newName                        : '')
573
+             . (null !== $node->newName ? ' ' . $node->newName : '')
574 574
              . ';';
575 575
     }
576 576
 
@@ -761,12 +761,12 @@  discard block
 block discarded – undo
761 761
     }
762 762
 
763 763
     protected function pModifiers($modifiers) {
764
-        return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC    ? 'public '    : '')
764
+        return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '')
765 765
              . ($modifiers & Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '')
766
-             . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE   ? 'private '   : '')
767
-             . ($modifiers & Stmt\Class_::MODIFIER_STATIC    ? 'static '    : '')
768
-             . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT  ? 'abstract '  : '')
769
-             . ($modifiers & Stmt\Class_::MODIFIER_FINAL     ? 'final '     : '');
766
+             . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '')
767
+             . ($modifiers & Stmt\Class_::MODIFIER_STATIC ? 'static ' : '')
768
+             . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '')
769
+             . ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : '');
770 770
     }
771 771
 
772 772
     protected function pEncapsList(array $encapsList, $quote) {
@@ -797,7 +797,7 @@  discard block
 block discarded – undo
797 797
             || $node instanceof Expr\ClassConstFetch
798 798
         ) {
799 799
             return $this->p($node);
800
-        } else  {
800
+        } else {
801 801
             return '(' . $this->p($node) . ')';
802 802
         }
803 803
     }
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
             || $node instanceof Expr\Array_
813 813
         ) {
814 814
             return $this->p($node);
815
-        } else  {
815
+        } else {
816 816
             return '(' . $this->p($node) . ')';
817 817
         }
818 818
     }
Please login to merge, or discard this patch.
lib/PhpParser/Lexer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
         $this->code = $code; // keep the code around for __halt_compiler() handling
64 64
         $this->pos  = -1;
65
-        $this->line =  1;
65
+        $this->line = 1;
66 66
         $this->filePos = 0;
67 67
     }
68 68
 
@@ -264,10 +264,10 @@  discard block
 block discarded – undo
264 264
             if (T_DOUBLE_COLON === $i) {
265 265
                 // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM
266 266
                 $tokenMap[$i] = Tokens::T_PAAMAYIM_NEKUDOTAYIM;
267
-            } elseif(T_OPEN_TAG_WITH_ECHO === $i) {
267
+            } elseif (T_OPEN_TAG_WITH_ECHO === $i) {
268 268
                 // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO
269 269
                 $tokenMap[$i] = Tokens::T_ECHO;
270
-            } elseif(T_CLOSE_TAG === $i) {
270
+            } elseif (T_CLOSE_TAG === $i) {
271 271
                 // T_CLOSE_TAG is equivalent to ';'
272 272
                 $tokenMap[$i] = ord(';');
273 273
             } elseif ('UNKNOWN' !== $name = token_name($i)) {
Please login to merge, or discard this patch.
lib/PhpParser/Node/Scalar/String_.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         if ('\'' === $str[$bLength]) {
56 56
             return str_replace(
57 57
                 array('\\\\', '\\\''),
58
-                array(  '\\',   '\''),
58
+                array('\\', '\''),
59 59
                 substr($str, $bLength + 1, -1)
60 60
             );
61 61
         } else {
@@ -110,14 +110,14 @@  discard block
 block discarded – undo
110 110
             return chr($num);
111 111
         }
112 112
         if ($num <= 0x7FF) {
113
-            return chr(($num>>6) + 0xC0) . chr(($num&0x3F) + 0x80);
113
+            return chr(($num >> 6) + 0xC0) . chr(($num & 0x3F) + 0x80);
114 114
         }
115 115
         if ($num <= 0xFFFF) {
116
-            return chr(($num>>12) + 0xE0) . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80);
116
+            return chr(($num >> 12) + 0xE0) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80);
117 117
         }
118 118
         if ($num <= 0x1FFFFF) {
119
-            return chr(($num>>18) + 0xF0) . chr((($num>>12)&0x3F) + 0x80)
120
-                 . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80);
119
+            return chr(($num >> 18) + 0xF0) . chr((($num >> 12) & 0x3F) + 0x80)
120
+                 . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80);
121 121
         }
122 122
         throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large');
123 123
     }
Please login to merge, or discard this patch.
lib/PhpParser/Node/Stmt/ClassMethod.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     public function __construct($name, array $subNodes = array(), array $attributes = array()) {
37 37
         parent::__construct($attributes);
38 38
         $this->type = isset($subNodes['type']) ? $subNodes['type'] : 0;
39
-        $this->byRef = isset($subNodes['byRef'])  ? $subNodes['byRef']  : false;
39
+        $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
40 40
         $this->name = $name;
41 41
         $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
42 42
         $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
Please login to merge, or discard this patch.
lib/PhpParser/Node/Stmt/Class_.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
 
8 8
 class Class_ extends ClassLike
9 9
 {
10
-    const MODIFIER_PUBLIC    =  1;
11
-    const MODIFIER_PROTECTED =  2;
12
-    const MODIFIER_PRIVATE   =  4;
13
-    const MODIFIER_STATIC    =  8;
10
+    const MODIFIER_PUBLIC    = 1;
11
+    const MODIFIER_PROTECTED = 2;
12
+    const MODIFIER_PRIVATE   = 4;
13
+    const MODIFIER_STATIC    = 8;
14 14
     const MODIFIER_ABSTRACT  = 16;
15 15
     const MODIFIER_FINAL     = 32;
16 16
 
Please login to merge, or discard this patch.