1 | <?php |
||
12 | class FightersGroup extends Model |
||
13 | { |
||
14 | protected $table = 'fighters_groups'; |
||
15 | public $timestamps = true; |
||
16 | protected $guarded = ['id']; |
||
17 | |||
18 | use NodeTrait; |
||
19 | |||
20 | /** |
||
21 | * Check if Request contains tournamentSlug / Should Move to TreeRequest When Built. |
||
22 | * |
||
23 | * @param $request |
||
24 | * |
||
25 | * @return bool |
||
26 | */ |
||
27 | public static function hasTournamentInRequest($request) |
||
31 | |||
32 | /** |
||
33 | * Check if Request contains championshipId / Should Move to TreeRequest When Built. |
||
34 | * |
||
35 | * @param $request |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | public static function hasChampionshipInRequest($request) |
||
43 | |||
44 | /** |
||
45 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
46 | */ |
||
47 | public function championship() |
||
51 | |||
52 | /** |
||
53 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
54 | */ |
||
55 | public function fights() |
||
59 | |||
60 | public function teams() |
||
64 | |||
65 | public function competitors() |
||
69 | |||
70 | /** |
||
71 | * Generate First Round Fights |
||
72 | * @param Championship $championship |
||
73 | */ |
||
74 | public static function generateFights(Championship $championship) |
||
89 | |||
90 | /** |
||
91 | * Supercharge of sync Many2Many function. |
||
92 | * Original sync doesn't insert NULL ids. |
||
93 | * |
||
94 | * @param $fighters |
||
95 | */ |
||
96 | public function syncTeams($fighters) |
||
110 | |||
111 | /** |
||
112 | * Supercharge of sync Many2Many function. |
||
113 | * Original sync doesn't insert NULL ids. |
||
114 | * |
||
115 | * @param $fighters |
||
116 | */ |
||
117 | public function syncCompetitors($fighters) |
||
133 | |||
134 | |||
135 | /** |
||
136 | * Get the many 2 many relationship with |
||
137 | * @return Collection |
||
138 | */ |
||
139 | public function competitorsWithNull() : Collection |
||
152 | |||
153 | |||
154 | public function teamsWithNull() : Collection |
||
167 | |||
168 | public function getFighters() : Collection |
||
182 | |||
183 | public static function getBaseNumGroups($initialGroupId, $numGroups, $numRound): int |
||
193 | } |
||
194 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: