| 1 | <?php |
||
| 11 | final class Select extends Query |
||
| 12 | { |
||
| 13 | use Traits\HasRelatedWith; |
||
| 14 | use Traits\HasPagination; |
||
| 15 | use Traits\HasJoinRelation; |
||
| 16 | |||
| 17 | private $one; |
||
| 18 | protected const ALLOWED_METHODS = [ |
||
| 19 | 'from', |
||
| 20 | 'columns', |
||
| 21 | 'join', |
||
| 22 | 'catJoin', |
||
| 23 | 'groupBy', |
||
| 24 | 'having', |
||
| 25 | 'orHaving', |
||
| 26 | 'orderBy', |
||
| 27 | 'catHaving', |
||
| 28 | 'where', |
||
| 29 | 'orWhere', |
||
| 30 | 'catWhere', |
||
| 31 | 'limit', |
||
| 32 | 'offset', |
||
| 33 | 'distinct', |
||
| 34 | 'forUpdate', |
||
| 35 | 'setFlag', |
||
| 36 | ]; |
||
| 37 | |||
| 38 | public function __construct(Table $table) |
||
| 50 | |||
| 51 | public function one(): self |
||
| 58 | |||
| 59 | public function run() |
||
| 74 | |||
| 75 | private function createRow(array $data): Row |
||
| 91 | } |
||
| 92 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: