Skip to content

Commit 6bd0c55

Browse files
committed
use native php type
1 parent 03cc8b1 commit 6bd0c55

File tree

1 file changed

+24
-105
lines changed

1 file changed

+24
-105
lines changed

tests/system/Models/UpdateModelTest.php

Lines changed: 24 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -208,43 +208,16 @@ public function testUpdateBatchValidationFail(): void
208208
public function testUpdateBatchWithEntity(): void
209209
{
210210
$entity1 = new class () extends Entity {
211-
/**
212-
* @var int
213-
*/
214-
protected $id;
215-
216-
/**
217-
* @var string
218-
*/
219-
protected $name;
220-
221-
/**
222-
* @var string
223-
*/
224-
protected $email;
225-
226-
/**
227-
* @var string
228-
*/
229-
protected $country;
230-
231-
/**
232-
* @var bool
233-
*/
234-
protected $deleted;
235-
236-
/**
237-
* @var string|null
238-
*/
239-
protected $created_at;
240-
241-
/**
242-
* @var string|null
243-
*/
244-
protected $updated_at;
211+
protected int $id;
212+
protected string $name;
213+
protected string $email;
214+
protected string $country;
215+
protected bool $deleted;
216+
protected int $created_at;
217+
protected int $updated_at;
245218

246219
/**
247-
* @var array{'datamap': array{}, 'dates': array{string, string, string}, 'casts': array{}}|null
220+
* @var array{'datamap': array{}, 'dates': array{string, string, string}, 'casts': array{}}
248221
*/
249222
protected $_options = [
250223
'datamap' => [],
@@ -258,43 +231,16 @@ public function testUpdateBatchWithEntity(): void
258231
};
259232

260233
$entity2 = new class () extends Entity {
261-
/**
262-
* @var int
263-
*/
264-
protected $id;
265-
266-
/**
267-
* @var string
268-
*/
269-
protected $name;
270-
271-
/**
272-
* @var string
273-
*/
274-
protected $email;
275-
276-
/**
277-
* @var string
278-
*/
279-
protected $country;
280-
281-
/**
282-
* @var bool
283-
*/
284-
protected $deleted;
234+
protected int $id;
235+
protected string $name;
236+
protected string $email;
237+
protected string $country;
238+
protected bool $deleted;
239+
protected int $created_at;
240+
protected int $updated_at;
285241

286242
/**
287-
* @var string|null
288-
*/
289-
protected $created_at;
290-
291-
/**
292-
* @var string|null
293-
*/
294-
protected $updated_at;
295-
296-
/**
297-
* @var array{'datamap': array{}, 'dates': array{string, string, string}, 'casts': array{}}|null
243+
* @var array{'datamap': array{}, 'dates': array{string, string, string}, 'casts': array{}}
298244
*/
299245
protected $_options = [
300246
'datamap' => [],
@@ -461,43 +407,16 @@ public function testUpdateWithEntityNoAllowedFields(): void
461407
$this->createModel(UserModel::class);
462408

463409
$entity = new class () extends Entity {
464-
/**
465-
* @var int
466-
*/
467-
protected $id;
468-
469-
/**
470-
* @var string
471-
*/
472-
protected $name;
473-
474-
/**
475-
* @var string
476-
*/
477-
protected $email;
478-
479-
/**
480-
* @var string
481-
*/
482-
protected $country;
483-
484-
/**
485-
* @var bool
486-
*/
487-
protected $deleted;
488-
489-
/**
490-
* @var int|null
491-
*/
492-
protected $created_at;
493-
494-
/**
495-
* @var int|null
496-
*/
497-
protected $updated_at;
410+
protected int $id;
411+
protected string $name;
412+
protected string $email;
413+
protected string $country;
414+
protected bool $deleted;
415+
protected int $created_at;
416+
protected int $updated_at;
498417

499418
/**
500-
* @var array{'datamap': array{}, 'dates': array{string, string, string}, 'casts': array{}}|null
419+
* @var array{'datamap': array{}, 'dates': array{string, string, string}, 'casts': array{}}
501420
*/
502421
protected $_options = [
503422
'datamap' => [],

0 commit comments

Comments
 (0)