File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1313
1414namespace CodeIgniter \Test \Interfaces ;
1515
16+ use CodeIgniter \BaseModel ;
1617use Faker \Generator ;
1718use ReflectionException ;
1819
2728 * @property string $returnType
2829 * @property string $primaryKey
2930 * @property string $dateFormat
31+ *
32+ * @phpstan-import-type row_array from BaseModel
3033 */
3134interface FabricatorModel
3235{
3336 /**
3437 * Fetches the row of database from $this->table with a primary key
3538 * matching $id.
3639 *
37- * @param array|mixed |null $id One primary key or an array of primary keys
40+ * @param int|list<int|string>|string |null $id One primary key or an array of primary keys
3841 *
39- * @return array| object|null The resulting row of data, or null.
42+ * @phpstan- return ($id is int|string ? row_array| object|null : list<row_array|object>)
4043 */
4144 public function find ($ id = null );
4245
4346 /**
4447 * Inserts data into the current table. If an object is provided,
4548 * it will attempt to convert it to an array.
4649 *
47- * @param array|object $data
48- * @param bool $returnID Whether insert ID should be returned or not.
50+ * @param array|object|null $row
51+ * @phpstan-param row_array|object|null $row
52+ * @param bool $returnID Whether insert ID should be returned or not.
4953 *
5054 * @return bool|int|string
5155 *
You can’t perform that action at this time.
0 commit comments