Maurits van der Schee 5 years ago
parent
commit
222f6ba78b
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      src/Tqdev/PhpCrudApi/Record/RecordService.php

+ 4
- 4
src/Tqdev/PhpCrudApi/Record/RecordService.php View File

55
         return $this->reflection->getType($table);
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
         $this->sanitizeRecord($tableName, $record, '');
60
         $this->sanitizeRecord($tableName, $record, '');
61
         $table = $this->reflection->getTable($tableName);
61
         $table = $this->reflection->getTable($tableName);
77
         return $records[0];
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
         $this->sanitizeRecord($tableName, $record, $id);
82
         $this->sanitizeRecord($tableName, $record, $id);
83
         $table = $this->reflection->getTable($tableName);
83
         $table = $this->reflection->getTable($tableName);
85
         return $this->db->updateSingle($table, $columnValues, $id);
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
         $table = $this->reflection->getTable($tableName);
90
         $table = $this->reflection->getTable($tableName);
91
         return $this->db->deleteSingle($table, $id);
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
         $this->sanitizeRecord($tableName, $record, $id);
96
         $this->sanitizeRecord($tableName, $record, $id);
97
         $table = $this->reflection->getTable($tableName);
97
         $table = $this->reflection->getTable($tableName);

Loading…
Cancel
Save