Maurits van der Schee 5 年之前
父節點
當前提交
222f6ba78b
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4
    4
      src/Tqdev/PhpCrudApi/Record/RecordService.php

+ 4
- 4
src/Tqdev/PhpCrudApi/Record/RecordService.php 查看文件

@@ -55,7 +55,7 @@ class RecordService
55 55
         return $this->reflection->getType($table);
56 56
     }
57 57
 
58
-    public function create(string $tableName, /* object */ $record, array $params)
58
+    public function create(string $tableName, /* object */ $record, array $params) /*: ?int*/
59 59
     {
60 60
         $this->sanitizeRecord($tableName, $record, '');
61 61
         $table = $this->reflection->getTable($tableName);
@@ -77,7 +77,7 @@ class RecordService
77 77
         return $records[0];
78 78
     }
79 79
 
80
-    public function update(string $tableName, string $id, /* object */ $record, array $params)
80
+    public function update(string $tableName, string $id, /* object */ $record, array $params) /*: ?int*/
81 81
     {
82 82
         $this->sanitizeRecord($tableName, $record, $id);
83 83
         $table = $this->reflection->getTable($tableName);
@@ -85,13 +85,13 @@ class RecordService
85 85
         return $this->db->updateSingle($table, $columnValues, $id);
86 86
     }
87 87
 
88
-    public function delete(string $tableName, string $id, array $params)
88
+    public function delete(string $tableName, string $id, array $params) /*: ?int*/
89 89
     {
90 90
         $table = $this->reflection->getTable($tableName);
91 91
         return $this->db->deleteSingle($table, $id);
92 92
     }
93 93
 
94
-    public function increment(string $tableName, string $id, /* object */ $record, array $params)
94
+    public function increment(string $tableName, string $id, /* object */ $record, array $params) /*: ?int*/
95 95
     {
96 96
         $this->sanitizeRecord($tableName, $record, $id);
97 97
         $table = $this->reflection->getTable($tableName);

Loading…
取消
儲存