Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
ProxiedMethodReturnExpression.php
01 <?php
02
03 declare(strict_types=1);
04
05 namespace ProxyManager\Generator\Util;
06
07 /**
08 * Utility class to generate return expressions in method, given a method signature.
09 *
10 * This is required since return expressions may be forbidden by the method signature (void).
11 *
12 * @author Marco Pivetta <ocramius@gmail.com>
13 * @license MIT
14 */
15 final class ProxiedMethodReturnExpression
16 {
17 public static function generate(string $returnedValueExpression, ?\ReflectionMethod $originalMethod) : string
18 {
19 if ($originalMethod && 'void' === (string) $originalMethod->getReturnType()) {
20 return $returnedValueExpression . ";\nreturn;";
21 }
22
23 return 'return ' . $returnedValueExpression . ';';
24 }
25 }
26