Skip to content

Commit 0c9cf03

Browse files
committed
Add throws on comments
1 parent 4da2df2 commit 0c9cf03

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/DataMapper.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
namespace Simples\Model;
44

5+
use Exception;
56
use Simples\Data\Collection;
7+
use Simples\Data\Error\SimplesRecordReadonlyError;
68
use Simples\Data\Error\SimplesResourceError;
79
use Simples\Data\Error\SimplesValidationError;
810
use Simples\Data\Record;
11+
use Simples\Error\SimplesRunTimeError;
912
use Simples\Model\Error\SimplesActionError;
1013
use Simples\Model\Error\SimplesHookError;
1114
use Simples\Persistence\Field;
@@ -40,6 +43,8 @@ abstract public function construct();
4043
* @param string $alias ('create')
4144
* @return Record
4245
* @throws SimplesHookError
46+
* @throws SimplesRecordReadonlyError
47+
* @throws SimplesRunTimeError
4348
*/
4449
final public function create($record = null, string $alias = null): Record
4550
{
@@ -96,6 +101,8 @@ final public function create($record = null, string $alias = null): Record
96101
* @param bool $clean (false)
97102
* @return Collection
98103
* @throws SimplesHookError
104+
* @throws SimplesRunTimeError
105+
* @throws Exception
99106
*/
100107
final public function read($record = null, string $alias = null, $trash = false, $clean = false): Collection
101108
{
@@ -153,6 +160,7 @@ final public function read($record = null, string $alias = null, $trash = false,
153160
* @throws SimplesActionError
154161
* @throws SimplesHookError
155162
* @throws SimplesResourceError
163+
* @throws SimplesRunTimeError
156164
*/
157165
final public function update($record = null, string $alias = null, bool $trash = false): Record
158166
{
@@ -216,6 +224,7 @@ final public function update($record = null, string $alias = null, bool $trash =
216224
* @throws SimplesActionError
217225
* @throws SimplesHookError
218226
* @throws SimplesResourceError
227+
* @throws SimplesRunTimeError
219228
*/
220229
final public function destroy($record = null, string $alias = null): Record
221230
{
@@ -280,6 +289,10 @@ final public function destroy($record = null, string $alias = null): Record
280289
* Recycle a destroyed record
281290
* @param array|Record $record (null)
282291
* @return Record
292+
* @throws SimplesActionError
293+
* @throws SimplesHookError
294+
* @throws SimplesResourceError
295+
* @throws SimplesRunTimeError
283296
* @throws SimplesValidationError
284297
*/
285298
final public function recycle($record = null): Record
@@ -303,7 +316,10 @@ final public function recycle($record = null): Record
303316
* Get total of records based on filters
304317
* @param Record $record
305318
* @return int
319+
* @throws Exception
306320
* @throws SimplesActionError
321+
* @throws SimplesHookError
322+
* @throws SimplesRunTimeError
307323
*/
308324
final public function count(Record $record): int
309325
{

0 commit comments

Comments
 (0)