| @@ 408-420 (lines=13) @@ | ||
| 405 | \$STATIC_METHOD_TYPES = [ |
|
| 406 | PHP; |
|
| 407 | $map .= "\n"; |
|
| 408 | foreach ($this->groupFactories as $group => $methods) { |
|
| 409 | foreach ($methods as $method) { |
|
| 410 | $map .= " " . $method . "('') => [\n"; |
|
| 411 | foreach ($classMaps[$group] as $classPrefix => $class) { |
|
| 412 | if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $class)) { |
|
| 413 | $map .= " '$classPrefix' instanceof \\$class,\n"; |
|
| 414 | } else { |
|
| 415 | $output->writeln('<warning>Invalid class name <comment>' . $class . '</comment> ignored</warning>'); |
|
| 416 | } |
|
| 417 | } |
|
| 418 | $map .= " ], \n"; |
|
| 419 | } |
|
| 420 | } |
|
| 421 | $map .= <<<PHP |
|
| 422 | ]; |
|
| 423 | } |
|
| @@ 452-463 (lines=12) @@ | ||
| 449 | $baseMap .= "\n"; |
|
| 450 | foreach ($this->groupFactories as $group => $methods) { |
|
| 451 | $map = $baseMap; |
|
| 452 | foreach ($methods as $method) { |
|
| 453 | $map .= " " . $method . "('') => [\n"; |
|
| 454 | asort($classMaps[$group]); |
|
| 455 | foreach ($classMaps[$group] as $classPrefix => $class) { |
|
| 456 | if (preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $class)) { |
|
| 457 | $map .= " '$classPrefix' instanceof \\$class,\n"; |
|
| 458 | } else { |
|
| 459 | $output->writeln('<warning>Invalid class name <comment>' . $class . '</comment> ignored</warning>'); |
|
| 460 | } |
|
| 461 | } |
|
| 462 | $map .= " ], \n"; |
|
| 463 | } |
|
| 464 | $map .= <<<PHP |
|
| 465 | ]; |
|
| 466 | } |
|