Skip to content
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
10 changes: 7 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
],
"license": "MIT",
"require": {
"php": ">=5.5",
"symfony/property-access": "^2.3"
"php": ">=8.1",
"symfony/property-access": "^5.4|^6.0",
"ext-zip": "*",
"ext-dom": "*",
"ext-simplexml": "*"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.0"
"phpunit/phpunit": "^9.5",
"rector/rector": "^0.15.0"
},
"autoload": {
"psr-4": {"leonverschuren\\Lenex\\": "src/"}
Expand Down
14 changes: 14 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/src',
]);

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_81,
]);
};
433 changes: 433 additions & 0 deletions src/Converter.php

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/Model/Club.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class Club
/** @var string */
protected $code;

/** @var int|null */
protected $clubId;

/** @var Contact */
protected $contact;

Expand Down Expand Up @@ -321,4 +324,14 @@ public function setType($type)

return $this;
}

public function getClubId(): ?int
{
return $this->clubId;
}

public function setClubId(?int $clubId): void
{
$this->clubId = $clubId;
}
}
108 changes: 108 additions & 0 deletions src/Model/Facility.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?php
/**
* This file is part of the lenex-php package.
*
* The Lenex file format is created by Swimrankings.net
*
* (c) Leon Verschuren <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace leonverschuren\Lenex\Model;

class Facility
{
/** @var string */
protected $name;

/** @var string */
protected $city;

/** @var string */
protected $nation;

/** @var string */
protected $state;

/** @var string */
protected $street;

/** @var string */
protected $street2;

/** @var int */
protected $zip;

public function getName(): ?string
{
return $this->name;
}

public function setName(string $name): void
{
$this->name = $name;
}

public function getCity(): ?string
{
return $this->city;
}

public function setCity(string $city): void
{
$this->city = $city;
}

public function getNation(): ?string
{
return $this->nation;
}

public function setNation(string $nation): void
{
$this->nation = $nation;
}

public function getState(): ?string
{
return $this->state;
}

public function setState(string $state): void
{
$this->state = $state;
}

public function getStreet(): ?string
{
return $this->street;
}

public function setStreet(string $street): void
{
$this->street = $street;
}

public function getStreet2(): ?string
{
return $this->street2;
}

public function setStreet2(string $street2): void
{
$this->street2 = $street2;
}

public function getZip(): ?int
{
return $this->zip;
}

public function setZip(int $zip): void
{
$this->zip = $zip;
}

}
28 changes: 25 additions & 3 deletions src/Model/Meet.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ class Meet
/** @var Pool */
protected $pool;

/** @var Facility */
protected $facility;

/** @var Qualify */
protected $qualify;

Expand Down Expand Up @@ -533,6 +536,17 @@ public function setPointTable($pointTable)
return $this;
}

/**
* @param Pool $pool
* @return $this
*/
public function setPool($pool)
{
$this->pool = $pool;

return $this;
}

/**
* @return Pool
*/
Expand All @@ -542,12 +556,20 @@ public function getPool()
}

/**
* @param Pool $pool
* @return Facility
*/
public function getFacility()
{
return $this->facility;
}

/**
* @param $facility
* @return $this
*/
public function setPool($pool)
public function setFacility($facility)
{
$this->pool = $pool;
$this->facility = $facility;

return $this;
}
Expand Down
56 changes: 47 additions & 9 deletions src/Model/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,47 @@

class Result
{
/** @var string */
/** @var string|null */
protected $comment;

/** @var int */
/** @var int|null */
protected $eventId;

/** @var int */
/** @var int|null */
protected $heatId;

/** @var int */
/** @var int|null */
protected $lane;

/** @var int */
/** @var int|null */
protected $points;

/** @var string */
/** @var string|null */
protected $reactionTime;

/** @var RelayPosition[] */
protected $relayPositions = [];

/** @var int */
/** @var int|null */
protected $resultId;

/** @var string */
/** @var string|null */
protected $status;

/** @var Split[] */
protected $splits = [];

/** @var string */
/** @var string|null */
protected $swimTime;

/** @var string|null */
protected $entryTime;

/** @var string|null */
protected $entryCourse;
/** @var string|null */
protected $late;

/**
* @return string
*/
Expand Down Expand Up @@ -255,4 +263,34 @@ public function setSwimTime($swimTime)

return $this;
}

public function getEntryTime(): ?string
{
return $this->entryTime;
}

public function setEntryTime(string $entryTime): void
{
$this->entryTime = $entryTime;
}

public function getEntryCourse(): ?string
{
return $this->entryCourse;
}

public function setEntryCourse(string $entryCourse): void
{
$this->entryCourse = $entryCourse;
}

public function getLate(): ?string
{
return $this->late;
}

public function setLate(?string $late): void
{
$this->late = $late;
}
}
13 changes: 13 additions & 0 deletions src/Model/TimeStandardList.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class TimeStandardList
/** @var string */
protected $course;

/** @var string */
protected $code;

/** @var string */
protected $gender;

Expand Down Expand Up @@ -189,4 +192,14 @@ public function setType($type)

return $this;
}

public function getCode(): ?string
{
return $this->code;
}

public function setCode(string $code): void
{
$this->code = $code;
}
}
1 change: 0 additions & 1 deletion src/Model/TimeStandardRef.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public function getFee()
}

/**
* @param Fee $fee
* @return $this
*/
public function setFee(Fee $fee)
Expand Down
Loading