Skip to content
This repository has been archived by the owner on Aug 11, 2019. It is now read-only.

Commit

Permalink
Updated to newest version
Browse files Browse the repository at this point in the history
fixed some array errors

Signed-off-by: Ricardo Boss <ricardo.boss@web.de>
  • Loading branch information
ricardoboss committed Nov 1, 2017
1 parent 2c49a88 commit a958441
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
14 changes: 7 additions & 7 deletions src/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ protected function retrieveData() {
$seasonIdentifier,
, // seasonDisplay
$lastUpdated,
$liveTrackingArray,
, // PlayerName
$this->pubgTrackerId,
$statsArray,
$matchHistoryArray
$statsArray/*,
$liveTrackingArray,
$matchHistoryArray*/
) = array_values($data);

$this->selectedRegion = Region::findByProperty($regionIdentifier);
$this->defaultSeason = Season::findByProperty($seasonIdentifier);
$this->lastUpdated = strtotime($lastUpdated);

foreach ($liveTrackingArray as $liveTrackingMatchArray)
$this->liveTracking[] = new MatchLiveTrackingEntry($liveTrackingMatchArray);
/*foreach ($liveTrackingArray as $liveTrackingMatchArray)
$this->liveTracking[] = new MatchLiveTrackingEntry($liveTrackingMatchArray);*/

foreach ($statsArray as $stats) {
$region = Region::findByProperty($stats['Region']);
Expand All @@ -102,8 +102,8 @@ protected function retrieveData() {
$this->stats[$regionId][$seasonId][$matchModeId] = new Stats($region, $season, $matchMode, $stats['Stats']);
}

foreach ($matchHistoryArray as $matchHistoryEntryArray)
$this->matchHistory[] = new MatchHistoryEntry($matchHistoryEntryArray);
/*foreach ($matchHistoryArray as $matchHistoryEntryArray)
$this->matchHistory[] = new MatchHistoryEntry($matchHistoryEntryArray);*/
}

/**
Expand Down
6 changes: 5 additions & 1 deletion src/Season.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class Season implements \JsonSerializable {
const EARLY_ACCESS_1 = 1;
const EARLY_ACCESS_2 = 2;
const EARLY_ACCESS_3 = 3;
const EARLY_ACCESS_4 = 4;
const EARLY_ACCESS_5 = 5;

/** @var string A string identifier; not to confuse with the id! */
protected $seasonIdentifier;
Expand Down Expand Up @@ -54,4 +56,6 @@ function jsonSerialize() {

new Season(Season::EARLY_ACCESS_1, "2017-pre1", "Early Access Season #1");
new Season(Season::EARLY_ACCESS_2, "2017-pre2", "Early Access Season #2");
new Season(Season::EARLY_ACCESS_3, "2017-pre3", "Early Access Season #3");
new Season(Season::EARLY_ACCESS_3, "2017-pre3", "Early Access Season #3");
new Season(Season::EARLY_ACCESS_4, "2017-pre4", "Early Access Season #4");
new Season(Season::EARLY_ACCESS_5, "2017-pre5", "Early Access Season #5");
2 changes: 0 additions & 2 deletions src/stats/Stat.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ class Stat implements \JsonSerializable {
*/
public function __construct($statArr) {
list(
$this->partition,
$this->label,
$this->subLabel,
$this->field,
$this->category,
$this->valueInt,
Expand Down

0 comments on commit a958441

Please sign in to comment.