1 | <?php |
||
11 | class FightersGroup extends Model |
||
12 | { |
||
13 | protected $table = 'fighters_groups'; |
||
14 | public $timestamps = true; |
||
15 | protected $guarded = ['id']; |
||
16 | |||
17 | /** |
||
18 | * Check if Request contains tournamentSlug / Should Move to TreeRequest When Built. |
||
19 | * |
||
20 | * @param $request |
||
21 | * |
||
22 | * @return bool |
||
23 | */ |
||
24 | public static function hasTournamentInRequest($request) |
||
28 | |||
29 | /** |
||
30 | * Check if Request contains championshipId / Should Move to TreeRequest When Built. |
||
31 | * |
||
32 | * @param $request |
||
33 | * |
||
34 | * @return bool |
||
35 | */ |
||
36 | public static function hasChampionshipInRequest($request) |
||
40 | |||
41 | /** |
||
42 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
43 | */ |
||
44 | public function championship() |
||
48 | |||
49 | /** |
||
50 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
51 | */ |
||
52 | public function fights() |
||
56 | |||
57 | public function teams() |
||
61 | |||
62 | public function competitors() |
||
66 | |||
67 | /** |
||
68 | * @param Collection $fightersGroup |
||
69 | * @param $settings |
||
70 | */ |
||
71 | public static function generateFights(Collection $fightersGroup, $settings, Championship $championship = null) |
||
91 | |||
92 | /** |
||
93 | * Supercharge of sync Many2Many function. |
||
94 | * Original sync doesn't insert NULL ids. |
||
95 | * |
||
96 | * @param $fighters |
||
97 | */ |
||
98 | public function syncTeams($fighters) |
||
112 | |||
113 | /** |
||
114 | * Supercharge of sync Many2Many function. |
||
115 | * Original sync doesn't insert NULL ids. |
||
116 | * |
||
117 | * @param $fighters |
||
118 | */ |
||
119 | public function syncCompetitors($fighters) |
||
135 | |||
136 | |||
137 | /** |
||
138 | * Get the many 2 many relationship with |
||
139 | * @return Collection |
||
140 | */ |
||
141 | public function competitorsWithNull() |
||
154 | |||
155 | |||
156 | public function teamsWithNull() |
||
169 | |||
170 | public function getFighters() |
||
185 | } |
||
186 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.