From 100f2e22cbb83f1598f1e164644c08e16c7d35c6 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Thu, 29 Jan 2026 19:35:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .php-cs-fixer.dist.php | 2 +- src/template/extension.cc.php | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 71658932..acf360f8 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -16,7 +16,7 @@ return (new PhpCsFixer\Config()) '@Symfony' => true, 'align_multiline_comment' => ['comment_type' => 'all_multiline'], 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => ['operators' => ['=' => 'align', '=>' => 'align', ]], + 'binary_operator_spaces' => ['operators' => ['=' => null, '=>' => null, ]], 'blank_line_after_namespace' => true, 'blank_line_before_statement' => ['statements' => ['declare']], 'class_attributes_separation' => true, diff --git a/src/template/extension.cc.php b/src/template/extension.cc.php index 9aade787..da872bf9 100644 --- a/src/template/extension.cc.php +++ b/src/template/extension.cc.php @@ -25,7 +25,7 @@ zend_class_entry * ; zend_class_entry *classMap) . ']' ?>; zend_class_entry *php_get_class_entry(int class_id, const char *class_name) { - if ([class_id] == nullptr) { + if (UNEXPECTED([class_id] == nullptr)) { [class_id] = php::getClassEntrySafe(class_name); } return [class_id]; @@ -107,13 +107,6 @@ foreach ($this->classes as $classDef): endforeach; endforeach; ?> - -// class entry -classMap as $class => $id): - ?> - = php::getClassEntry("escapeString($class) ?>"); - } void php_app_clean() {