|
@@ -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);
|