]> git.joonet.de Git - adminer.git/commitdiff
Compile: Support private static
authorJakub Vrana <jakub@vrana.cz>
Wed, 12 Mar 2025 04:03:42 +0000 (05:03 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 12 Mar 2025 04:03:42 +0000 (05:03 +0100)
compile.php

index fda698df1df01269040ba08986c902e91b1b179d..b56c676f7dc9befa8ce750a1bc2b827e0bdeee59 100755 (executable)
@@ -297,13 +297,13 @@ function php_shrink($input) {
                                $doc_comment = true;
                                $token[1] = substr_replace($token[1], "* @version $VERSION\n", -2, 0);
                        }
-                       if (($token[0] == T_VAR || $token[0] == T_PUBLIC || $token[0] == T_PROTECTED || $token[0] == T_PRIVATE) && $tokens[$i+2][1][0] == '$') {
-                               if ($token[0] == T_PUBLIC) {
+                       if ($token[0] == T_VAR || $token[0] == T_PUBLIC || $token[0] == T_PROTECTED || $token[0] == T_PRIVATE) {
+                               if ($token[0] == T_PUBLIC && $tokens[$i+2][1][0] == '$') {
                                        $token[1] = 'var';
                                }
                                $shortening = false;
                        } elseif (!$shortening) {
-                               if ($token[1] == ';') {
+                               if ($token[1] == ';' || $token[0] == T_FUNCTION) {
                                        $shortening = true;
                                }
                        } elseif ($token[0] == T_ECHO) {