Skip to content

Commit 58bf6ae

Browse files
authored
Merge pull request #6 from sidz/add-model-stub-with-find-count-method
Add Model.stub and define what find('count') returns
2 parents fa4edd9 + 16be682 commit 58bf6ae

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

extension.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ parameters:
99
schemaPaths:
1010
- app/Config/Schema/*.php
1111
stubFiles:
12+
- stubs/Model/Model.stub
1213
- stubs/Routing/Router.stub
1314
- stubs/Utility.stub
1415
services:

stubs/Model/Model.stub

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
class Model
4+
{
5+
/**
6+
* @param string $type
7+
* @param array<string, mixed> $query
8+
*
9+
* @return ($type is 'count' ? int : (array<array-key, mixed>|int|null))
10+
*/
11+
public function find($type = 'first', $query = array()) {}
12+
}

0 commit comments

Comments
 (0)