Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump league/flysystem from 1.1.3 to 1.1.4 #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 39 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions config/laravel-tournaments.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
| The name of the table to create in the database
|
*/
// 'user_table' => 'users',
// 'user_table' => 'users',
'user' => [
'table' => 'users',
'primary_key' => 'id',
Expand All @@ -25,11 +25,11 @@
'4' => '1/2 Final',
'5' => 'Final',
],
// 'gender' => [
// '1' => '-',
// '2' => 'M',
// '3' => 'F',
// ],
// 'gender' => [
// '1' => '-',
// '2' => 'M',
// '3' => 'F',
// ],

'preliminaryGroupSize' => [3 => 3, 4 => 4, 5 => 5],
'preliminaryPassing' => [1 => 1], // , 2 => 2, 3 => 3
Expand Down
2 changes: 1 addition & 1 deletion database/factories/ChampionshipSettingsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Xoco70\LaravelTournaments\Models\Championship;
use Xoco70\LaravelTournaments\Models\ChampionshipSettings;

$factory->define(ChampionshipSettings::class, function (Faker\Generator $faker) use ($factory) {
$factory->define(ChampionshipSettings::class, function (Faker\Generator $faker) {
$tcs = Championship::all()->pluck('id')->toArray();

$fightingAreas = [1, 2, 4, 8];
Expand Down
18 changes: 9 additions & 9 deletions src/Models/Venue.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ class Venue extends Model
protected $table = 'venue';
public $timestamps = true;
protected $fillable = [
'venue_name',
'address',
'details',
'city',
'CP',
'state',
'latitude',
'longitude',
];
'venue_name',
'address',
'details',
'city',
'CP',
'state',
'latitude',
'longitude',
];
}
1 change: 1 addition & 0 deletions src/TreeGen/SingleEliminationTreeGen.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ protected function pushEmptyGroupsToTree($numFighters)
$numFightersElim = $numFighters / $this->settings->preliminaryGroupSize * 2;
// We calculate how much rounds we will have
$numRounds = intval(log($numFightersElim, 2)); // 3 rounds, but begining from round 2 ( ie => 4)

return $this->pushGroups($numRounds, $numFightersElim);
}
// We calculate how much rounds we will have
Expand Down
2 changes: 2 additions & 0 deletions src/TreeGen/TreeGen.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ protected function getFightersByArea()
$fighters = $this->getFighters(); // Get Competitor or Team Objects
$fighterByEntity = $this->getFightersByEntity($fighters); // Chunk it by entities (Fede, Assoc, Club,...)
$fightersWithBye = $this->adjustFightersGroupWithByes($fighters, $fighterByEntity); // Fill with Byes

return $fightersWithBye->chunk(count($fightersWithBye) / $areas); // Chunk user by areas
}

Expand Down Expand Up @@ -303,6 +304,7 @@ protected function getNumArea($round, $order)
$areaSize = $numGroups / ($totalAreas * pow(2, $round - 1));

$numArea = intval(ceil($order / $areaSize)); // if round == 4, and second match 2/2 = 1 BAD

return $numArea;
}

Expand Down