This commit is contained in:
salam committed 2026-08-12 14:36:39 +02:00
1 parent 34b93bd49f
commit a4c227db3c
1 file changed
+16 -17
+16 -17
View File
@@ -63,27 +63,26 @@ class LoadPlayer
break; break;
} }
if (!$val->details->position)
dd($val);
$colorlevel = round($matches_count / 3); $colorlevel = round($matches_count / 3);
$preferred_foot = $val->details->preferred_foot ?? ''; $preferred_foot = $val->details->preferred_foot;
$player_position = ''; $player_position = ' (Role ' . $val->details->position . ')';
if (isset($val->details->position))
$player_position = ' (Role ' . $val->details->position . ')';
if (isset($val->details->position)) { if (in_array($val->details->position, $positions_map['MIDFIELD'])) {
if (in_array($val->details->position, $positions_map['MIDFIELD'])) { $position = 'MIDFIELD';
$position = 'MIDFIELD'; } else if (in_array($val->details->position, $positions_map['DEFENCE'])) {
} else if (in_array($val->details->position, $positions_map['DEFENCE'])) { $position = 'DEFENCE';
$position = 'DEFENCE'; } else if (in_array($val->details->position, $positions_map['ATTACK'])) {
} else if (in_array($val->details->position, $positions_map['ATTACK'])) { $position = 'ATTACK';
$position = 'ATTACK'; } else if (in_array($val->details->position, $positions_map['GOALKEEPER'])) {
} else if (in_array($val->details->position, $positions_map['GOALKEEPER'])) { $position = 'GOALKEEPER';
$position = 'GOALKEEPER'; } else {
} else { $player_position = $val->details->position;
$player_position = $val->details->position; $position = 'NO SPECIFIC POSITION';
$position = 'NO SPECIFIC POSITION';
}
} }
$infostring = $events_played . ' Ev'; $infostring = $events_played . ' Ev';