@@ 117-128 (lines=12) @@ | ||
114 | $this->add( new Declarations\Class_Const( $file, $line, $class_name, $name ) ); |
|
115 | break; |
|
116 | ||
117 | case 'method': |
|
118 | $params = json_decode( $params_json ); |
|
119 | $declaration = new Declarations\Class_Method( $file, $line, $class_name, $name, $static ); |
|
120 | if ( is_array( $params ) ) { |
|
121 | foreach ( $params as $param ) { |
|
122 | $declaration->add_param( $param->name, $param->default, $param->type, $param->byRef, $param->variadic ); |
|
123 | } |
|
124 | } |
|
125 | ||
126 | $this->add( $declaration ); |
|
127 | ||
128 | break; |
|
129 | ||
130 | case 'function': |
|
131 | $params = json_decode( $params_json ); |
|
@@ 130-141 (lines=12) @@ | ||
127 | ||
128 | break; |
|
129 | ||
130 | case 'function': |
|
131 | $params = json_decode( $params_json ); |
|
132 | $declaration = new Declarations\Function_( $file, $line, $name ); |
|
133 | if ( is_array( $params ) ) { |
|
134 | foreach ( $params as $param ) { |
|
135 | $declaration->add_param( $param->name, $param->default, $param->type, $param->byRef, $param->variadic ); |
|
136 | } |
|
137 | } |
|
138 | ||
139 | $this->add( $declaration ); |
|
140 | ||
141 | break; |
|
142 | } |
|
143 | $row++; |
|
144 | } |