Skip to content

Commit 222f6ba

Browse files
committed
wip
1 parent 0ad4642 commit 222f6ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Tqdev/PhpCrudApi/Record/RecordService.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function getType(string $table): string
5555
return $this->reflection->getType($table);
5656
}
5757

58-
public function create(string $tableName, /* object */ $record, array $params)
58+
public function create(string $tableName, /* object */ $record, array $params) /*: ?int*/
5959
{
6060
$this->sanitizeRecord($tableName, $record, '');
6161
$table = $this->reflection->getTable($tableName);
@@ -77,21 +77,21 @@ public function read(string $tableName, string $id, array $params) /*: ?object*/
7777
return $records[0];
7878
}
7979

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*/
8181
{
8282
$this->sanitizeRecord($tableName, $record, $id);
8383
$table = $this->reflection->getTable($tableName);
8484
$columnValues = $this->columns->getValues($table, true, $record, $params);
8585
return $this->db->updateSingle($table, $columnValues, $id);
8686
}
8787

88-
public function delete(string $tableName, string $id, array $params)
88+
public function delete(string $tableName, string $id, array $params) /*: ?int*/
8989
{
9090
$table = $this->reflection->getTable($tableName);
9191
return $this->db->deleteSingle($table, $id);
9292
}
9393

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*/
9595
{
9696
$this->sanitizeRecord($tableName, $record, $id);
9797
$table = $this->reflection->getTable($tableName);

0 commit comments

Comments
 (0)