Sfoglia il codice sorgente

调整实体返回类型

sunxbiao 6 mesi fa
parent
commit
e8b391631c
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      app/entity/CommonEntity.php

+ 2 - 2
app/entity/CommonEntity.php

@@ -10,9 +10,9 @@ class CommonEntity
10
     /**
10
     /**
11
      * 将 参数 实例化到 实体
11
      * 将 参数 实例化到 实体
12
      * @param array $data
12
      * @param array $data
13
-     * @return CommonEntity
13
+     * @return static|self
14
      */
14
      */
15
-    public static function newInstance(array $data = []): CommonEntity
15
+    public static function newInstance(array $data = []): self
16
     {
16
     {
17
         if (empty($data)) {
17
         if (empty($data)) {
18
             return new static();
18
             return new static();