| @@ 170-178 (lines=9) @@ | ||
| 167 | if ($this->string_helper->startsWith("export", $line)) { |
|
| 168 | $export_line = explode("export", $raw_line, 2); |
|
| 169 | ||
| 170 | if (count($export_line) !== 2 || empty($export_line[1])) { |
|
| 171 | throw new ParseException( |
|
| 172 | 'You must have a export key = value', |
|
| 173 | $this->origin_exception, |
|
| 174 | $this->file, |
|
| 175 | $raw_line, |
|
| 176 | $this->line_num |
|
| 177 | ); |
|
| 178 | } |
|
| 179 | ||
| 180 | $line = trim($export_line[1]); |
|
| 181 | } |
|
| @@ 213-221 (lines=9) @@ | ||
| 210 | { |
|
| 211 | $variable_default = explode($parameter_symbol, $variable_name, 2); |
|
| 212 | ||
| 213 | if (count($variable_default) !== 2 || empty($variable_default[1])) { |
|
| 214 | throw new ParseException( |
|
| 215 | 'You must have valid parameter expansion syntax, eg. ${parameter:=word}', |
|
| 216 | $this->parser->origin_exception, |
|
| 217 | $this->parser->file, |
|
| 218 | $variable_name, |
|
| 219 | $this->parser->line_num |
|
| 220 | ); |
|
| 221 | } |
|
| 222 | ||
| 223 | return array(trim($variable_default[0]), trim($variable_default[1])); |
|
| 224 | } |
|