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