diff --git a/Sources/src/data/core/database/ActiviteEntity.php b/Sources/src/data/core/database/ActiviteEntity.php
deleted file mode 100644
index a29a0a47..00000000
--- a/Sources/src/data/core/database/ActiviteEntity.php
+++ /dev/null
@@ -1,127 +0,0 @@
-idActivity;
- }
-
- public function getType() {
- return $this->type;
- }
-
- public function getDate() {
- return $this->date;
- }
-
- public function getHeureDebut() {
- return $this->heureDebut;
- }
-
- public function getHeureFin() {
- return $this->heureFin;
- }
-
- public function getEffortRessenti() {
- return $this->effortRessenti;
- }
-
- public function getVariabilite() {
- return $this->variabilite;
- }
-
- public function getVariance() {
- return $this->variance;
- }
-
- public function getEcartType() {
- return $this->ecartType;
- }
-
- public function getMoyenne() {
- return $this->moyenne;
- }
-
- public function getMaximum() {
- return $this->maximum;
- }
-
- public function getMinimum() {
- return $this->minimum;
- }
-
- public function getTemperatureMoyenne() {
- return $this->temperatureMoyenne;
- }
-
- // Setters
- public function setIdActivite($idActivite) {
- $this->idActivity = $idActivity;
- }
-
- public function setType($type) {
- $this->type = $type;
- }
-
- public function setDate($date) {
- $this->date = $date;
- }
-
- public function setHeureDebut($heureDebut) {
- $this->heureDebut = $heureDebut;
- }
-
- public function setHeureFin($heureFin) {
- $this->heureFin = $heureFin;
- }
-
- public function setEffortRessenti($effortRessenti) {
- $this->effortRessenti = $effortRessenti;
- }
-
- public function setVariabilite($variabilite) {
- $this->variabilite = $variabilite;
- }
-
- public function setVariance($variance) {
- $this->variance = $variance;
- }
-
- public function setEcartType($ecartType) {
- $this->ecartType = $ecartType;
- }
-
- public function setMoyenne($moyenne) {
- $this->moyenne = $moyenne;
- }
-
- public function setMaximum($maximum) {
- $this->maximum = $maximum;
- }
-
- public function setMinimum($minimum) {
- $this->minimum = $minimum;
- }
-
- public function setTemperatureMoyenne($temperatureMoyenne) {
- $this->temperatureMoyenne = $temperatureMoyenne;
- }
-}
-
-?>
diff --git a/Sources/src/data/core/database/ActiviteGateway.php b/Sources/src/data/core/database/ActiviteGateway.php
deleted file mode 100644
index 853cffa0..00000000
--- a/Sources/src/data/core/database/ActiviteGateway.php
+++ /dev/null
@@ -1,120 +0,0 @@
-connection = $connection;
- }
-
- public function getActivite() {
- $query = "SELECT * FROM Activite";
- return $this->connection->executeWithErrorHandling($query);
- }
-
- public function getActiviteById(int $activiteId) {
- $query = "SELECT * FROM Activite WHERE idActivite = :id";
- $params = [':id' => [$activiteId, PDO::PARAM_INT]];
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-
- public function getActiviteByType(string $type) {
- $query = "SELECT * FROM Activite WHERE type = :type";
- $params = [':type' => [$type, PDO::PARAM_STR]];
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-
- public function getActiviteByDate(string $date) {
- $query = "SELECT * FROM Activite WHERE date = :date";
- $params = [':date' => [$date, PDO::PARAM_STR]];
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-
- public function getActiviteByTimeRange(string $startTime, string $endTime) {
- $query = "SELECT * FROM Activite WHERE heureDebut >= :startTime AND heureFin <= :endTime";
- $params = [
- ':startTime' => [$startTime, PDO::PARAM_STR],
- ':endTime' => [$endTime, PDO::PARAM_STR]
- ];
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-
- public function getActiviteByEffort(int $effortRessenti) {
- $query = "SELECT * FROM Activite WHERE effortRessenti = :effort";
- $params = [':effort' => [$effortRessenti, PDO::PARAM_INT]];
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-
- public function getActiviteByVariability(int $variabilite) {
- $query = "SELECT * FROM Activite WHERE variabilite = :variability";
- $params = [':variability' => [$variabilite, PDO::PARAM_INT]];
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-
- public function getActiviteByTemperature(int $temperatureMoyenne) {
- $query = "SELECT * FROM Activite WHERE temperatureMoyenne = :temperature";
- $params = [':temperature' => [$temperatureMoyenne, PDO::PARAM_INT]];
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-
- public function addActivite(ActiviteEntity $activite) {
- $query = "INSERT INTO Activite (type, date, heureDebut, heureDeFin, effortRessenti, variabilite, variance, ecartType, moyenne, maximum, minimum, temperatureMoyenne)
- VALUES (:type, :date, :heureDebut, :heureDeFin, :effortRessenti, :variabilite, :variance, :ecartType, :moyenne, :maximum, :minimum, :temperatureMoyenne)";
-
- $params = [
- ':type' => $activite->getType(),
- ':date' => $activite->getDate()->format('Y-m-d'), // Format date pour SQL
- ':heureDebut' => $activite->getHeureDebut()->format('H:i:s'), // Format heure pour SQL
- ':heureDeFin' => $activite->getHeureFin()->format('H:i:s'), // Format heure pour SQL
- ':effortRessenti' => $activite->getEffortRessenti(),
- ':variabilite' => $activite->getVariabilite(),
- ':variance' => $activite->getVariance(),
- ':ecartType' => $activite->getEcartType(),
- ':moyenne' => $activite->getMoyenne(),
- ':maximum' => $activite->getMaximum(),
- ':minimum' => $activite->getMinimum(),
- ':temperatureMoyenne' => $activite->getTemperatureMoyenne(),
- ];
-
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-
- public function updateActivite(ActiviteEntity $oldActivite, ActiviteEntity $newActivite) {
- $query = "UPDATE Activite
- SET type = :type, date = :date, heureDebut = :heureDebut, heureDeFin = :heureDeFin,
- effortRessenti = :effortRessenti, variabilite = :variabilite, variance = :variance, ecartType = :ecartType, moyenne = :moyenne, maximum = :maximum, minimum = :minimum, temperatureMoyenne = :temperatureMoyenne
- WHERE idActivite = :idActivite";
-
- $params = [
- ':idActivite' => $oldActivite->getIdActivite(),
- ':type' => $newActivite->getType(),
- ':date' => $newActivite->getDate()->format('Y-m-d'), // Format date pour SQL
- ':heureDebut' => $newActivite->getHeureDebut()->format('H:i:s'), // Format heure pour SQL
- ':heureDeFin' => $newActivite->getHeureFin()->format('H:i:s'), // Format heure pour SQL
- ':effortRessenti' => $newActivite->getEffortRessenti(),
- ':variabilite' => $newActivite->getVariabilite(),
- ':variance' => $newActivite->getVariance(),
- ':ecartType' => $newActivite->getEcartType(),
- ':moyenne' => $newActivite->getMoyenne(),
- ':maximum' => $newActivite->getMaximum(),
- ':minimum' => $newActivite->getMinimum(),
- ':temperatureMoyenne' => $newActivite->getTemperatureMoyenne(),
- ];
-
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-
- public function deleteActivite(int $idActivite) {
- $query = "DELETE FROM Activite WHERE idActivite = :idActivite";
-
- $params = [
- ':idActivite' => $idActivite,
- ];
-
- return $this->connection->executeWithErrorHandling($query, $params);
- }
-}
-
-?>
diff --git a/Sources/src/data/core/database/ActiviteMapper.php b/Sources/src/data/core/database/ActiviteMapper.php
deleted file mode 100644
index d2097e10..00000000
--- a/Sources/src/data/core/database/ActiviteMapper.php
+++ /dev/null
@@ -1,51 +0,0 @@
-setIdActivite($data['idActivite']);
- $activite->setType($data['type']);
- $activite->setDate($data['date']);
- $activite->setHeureDebut($data['heureDebut']);
- $activite->setHeureFin($data['heureFin']);
- $activite->setEffortRessenti($data['effortRessenti']);
- $activite->setVariabilite($data['variabilite']);
- $activite->setVariance($data['variance']);
- $activite->setEcartType($data['ecartType']);
- $activite->setMoyenne($data['moyenne']);
- $activite->setMaximum($data['maximum']);
- $activite->setMinimum($data['minimum']);
- $activite->setTemperatureMoyenne($data['temperatureMoyenne']);
-
- return $activite;
- }
-
- //public function ActiviteEntityToModel(ActiviteEntity entity): Activite;
-
- public function ActiviteEntityToModel(ActiviteEntity $activiteEntity):Activite{
-
- $act = new Activite(
- $activiteEntity->getIdActivite(),
- $activiteEntity->getType(),
- $activiteEntity->getDate(),
- $activiteEntity->getHeureDebut(),
- $activiteEntity->getHeureFin(),
- $activiteEntity->getEffortRessenti(),
- $activiteEntity->getVariabilite(),
- $activiteEntity->getVariance(),
- $activiteEntity->getEcartType(),
- $activiteEntity->getMoyenne(),
- $activiteEntity->getMaximum(),
- $activiteEntity->getMinimum(),
- $activiteEntity->getTemperatureMoyenne()
- );
-
- return $act;
- }
- //public function ActiviteToEntity(Activite model): ActiviteEntity;
-}
-
-?>
diff --git a/Sources/src/data/core/database/ActivityMapper.php b/Sources/src/data/core/database/ActivityMapper.php
index 8c6f890f..080ae21a 100644
--- a/Sources/src/data/core/database/ActivityMapper.php
+++ b/Sources/src/data/core/database/ActivityMapper.php
@@ -21,9 +21,9 @@ class ActivityMapper {
$activity->setType($activityData['type']);
}
-// if (isset($activityData['date'])) {
-// $activity->setDate(DateTime::createFromFormat('yyyy-mm--dd',$activityData['date']));
-// }
+ if (isset($activityData['date'])) {
+ $activity->setDate(new DateTime($activityData['date']));
+ }
if (isset($activityData['heureDeDebut'])) {
$activity->setHeureDebut(new DateTime($activityData['heureDeDebut']));
@@ -67,7 +67,7 @@ class ActivityMapper {
$activityEntities[] = $activity;
}
- Log::dd($activityEntities);
+
return $activityEntities;
}
@@ -75,9 +75,9 @@ class ActivityMapper {
* @throws \Exception
*/
public function ActivityEntityToModel(ActivityEntity $activiteEntity):Activity {
- $date = new DateTime($activiteEntity->getDate());
- $heureDebut = new \DateTime($activiteEntity->getHeureDebut());
- $heureFin = new \DateTime($activiteEntity->getHeureFin());
+ $date = new DateTime($activiteEntity->getDate()->format('Y-m-d'));
+ $heureDebut = new \DateTime($activiteEntity->getHeureDebut()->format('H:i:s'));
+ $heureFin = new \DateTime($activiteEntity->getHeureFin()->format('H:i:s'));
$effortRessenti = intval($activiteEntity->getEffortRessenti());
$variability = floatval($activiteEntity->getVariability());
$variance = floatval($activiteEntity->getVariance());
diff --git a/Sources/src/data/core/database/AthleteEntity.php b/Sources/src/data/core/database/AthleteEntity.php
index eae5d275..4f06db70 100644
--- a/Sources/src/data/core/database/AthleteEntity.php
+++ b/Sources/src/data/core/database/AthleteEntity.php
@@ -31,6 +31,7 @@ class AthleteEntity {
public function getUsername(){
return $this->username;
}
+
public function getEmail() {
return $this->email;
}
@@ -104,5 +105,3 @@ class AthleteEntity {
$this->isCoach = $isCoach;
}
}
-
-?>
diff --git a/Sources/src/data/core/database/AthleteGateway.php b/Sources/src/data/core/database/AthleteGateway.php
index cff39e4f..df51b13b 100644
--- a/Sources/src/data/core/database/AthleteGateway.php
+++ b/Sources/src/data/core/database/AthleteGateway.php
@@ -3,6 +3,7 @@
namespace Database;
use \PDO;
+use Shared\Log;
class AthleteGateway {
private Connexion $connection;
diff --git a/Sources/src/data/core/json/JsonSerializer.php b/Sources/src/data/core/json/JsonSerializer.php
new file mode 100644
index 00000000..aa4422ba
--- /dev/null
+++ b/Sources/src/data/core/json/JsonSerializer.php
@@ -0,0 +1,20 @@
+getMessage());
+ return ''; // Ou retournez une valeur par défaut, selon vos besoins
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Sources/src/data/core/network/AuthService.php b/Sources/src/data/core/network/AuthService.php
index a706f2ce..5dcae3ea 100644
--- a/Sources/src/data/core/network/AuthService.php
+++ b/Sources/src/data/core/network/AuthService.php
@@ -29,7 +29,9 @@ class AuthService implements IAuthService
return false;
}
$this->currentUser = $user;
- Session::getInstance()->__set(USER, $this->currentUser->getId());
+ $id = $this->currentUser->getId();
+ Session::getInstance()->__set(USER, $id);
+ Session::getInstance()->__get(USER);
return true;
}
@@ -85,7 +87,7 @@ class AuthService implements IAuthService
Session::getInstance()->destroy();
return true;
}
-
+
public function getCurrentUser(): ?User
{
if (!empty(Session::getInstance()->__get(USER)) && $this->currentUser === null) {
diff --git a/Sources/src/data/model/Notification.php b/Sources/src/data/model/Notification.php
index 7472632a..406824bd 100644
--- a/Sources/src/data/model/Notification.php
+++ b/Sources/src/data/model/Notification.php
@@ -2,8 +2,46 @@
namespace Model;
+use DateTime;
+
class Notification
{
+ private static $lastId = 0;
+ private int $idNotif;
+ private string $message;
+ private \DateTime $date;
+ private bool $statut;
+ private string $urgence;
+ private int $toUserId;
+ /**
+ * @param string $type
+ * @param string $message
+ */
+ public function __construct(
+ string $message,
+ DateTime $date,
+ string $statut,
+ string $urgence,
+ int $toUserId
+ )
+ {
+ $this->idNotif = self::generateId();
+ $this->message = $message;
+ $this->date = $date;
+ $this->statut = $statut;
+ $this->urgence = $urgence;
+ $this->toUserId =$toUserId;
+ }
+ private static function generateId(): int
+ {
+ self::$lastId++;
+ return self::$lastId;
+ }
+
+ public function getId(){ return $this->idNotif;}
+ public function getDate(){ return $this->date;}
+ public function getStatut(){ return $this->statut;}
+ public function getUrgence(){ return $this->urgence;}
/**
* @return string
*/
@@ -36,10 +74,6 @@ class Notification
$this->message = $message;
}
- private string $type;
- private string $message;
- private int $toUserId;
-
/**
* @return int
*/
@@ -55,16 +89,6 @@ class Notification
{
$this->toUserId = $toUserId;
}
- /**
- * @param string $type
- * @param string $message
- */
- public function __construct(int $toUserId,string $type, string $message)
- {
- $this->type = $type;
- $this->toUserId =$toUserId;
- $this->message = $message;
- }
public function __toString(): string
{
return var_export($this, true);
diff --git a/Sources/src/data/model/Role.php b/Sources/src/data/model/Role.php
index 4f0e0688..741f4610 100644
--- a/Sources/src/data/model/Role.php
+++ b/Sources/src/data/model/Role.php
@@ -18,7 +18,6 @@ use Stub\TrainingRepository;
* @brief Classe abstraite représentant le rôle d'un utilisateur.
*/
abstract class Role {
- protected int $id;
protected array $usersList = [];
protected array $usersRequests = [];
protected array $trainingList = [];
diff --git a/Sources/src/data/model/Training.php b/Sources/src/data/model/Training.php
index 98291d77..0fb4ba72 100644
--- a/Sources/src/data/model/Training.php
+++ b/Sources/src/data/model/Training.php
@@ -4,6 +4,7 @@ namespace Model;
class Training
{
+ private static $lastId = 0;
private int $idTraining;
private \DateTime $date;
private float $latitude;
@@ -12,20 +13,25 @@ class Training
private ?String $feedback;
public function __construct(
- int $idTraining,
+ int $id,
\DateTime $date,
float $latitude,
float $longitude,
?String $description = null,
?String $feedback = null
) {
- $this->idTraining = $idTraining;
+ $this->idTraining = $id;
$this->date = $date;
$this->latitude = $latitude;
$this->longitude = $longitude;
$this->description = $description;
$this->feedback = $feedback;
}
+ private static function generateId(): int
+ {
+ self::$lastId++;
+ return self::$lastId;
+ }
public function getId():int {
return $this->idTraining;
}
@@ -33,7 +39,13 @@ class Training
return $this->date;
}
public function getLocation(): String {
- return $this->longitude . $this->latitude;
+ return $this->longitude . ", " . $this->latitude;
+ }
+ public function getLatitude(): float {
+ return $this->latitude;
+ }
+ public function getLongitude(): float {
+ return $this->longitude;
}
public function getDescription(): String
{
diff --git a/Sources/src/data/model/User.php b/Sources/src/data/model/User.php
index ac96da73..b6adfedd 100644
--- a/Sources/src/data/model/User.php
+++ b/Sources/src/data/model/User.php
@@ -16,6 +16,7 @@ namespace Model;
* @brief Classe représentant un utilisateur.
*/
class User {
+// private static $lastId = 0;
private int $id;
private String $username;
private string $nom;
@@ -28,14 +29,7 @@ class User {
private \DateTime $dateNaissance;
private Role $role;
protected array $notifications = [];
-
- /**
- * @return array
- */
- public function getNotifications(): array
- {
- return $this->notifications;
- }
+ private array $listFriend = [];
/**
* @param int $id
@@ -50,7 +44,9 @@ class User {
* @param \DateTime $dateNaissance
* @param \Model\Role $role
*/
- public function __construct(int $id, string $nom, string $prenom, string $username, string $email, string $motDePasse, string $sexe, float $taille, float $poids, \DateTime $dateNaissance, Role $role)
+ public function __construct(int $id, string $nom, string $prenom, string $username, string $email,
+ string $motDePasse, string $sexe, float $taille, float $poids, \DateTime $dateNaissance,
+ Role $role)
{
$this->id = $id;
$this->nom = $nom;
@@ -64,6 +60,18 @@ class User {
$this->dateNaissance = $dateNaissance;
$this->role = $role;
}
+ private static function generateId(): int
+ {
+ self::$lastId++;
+ return self::$lastId;
+ }
+ /**
+ * @return array
+ */
+ public function getNotifications(): array
+ {
+ return $this->notifications;
+ }
public function addNotification($notification): void {
$this->notifications[] = $notification;
@@ -289,5 +297,23 @@ class User {
public function __toString() {
return "Athlete [ID: {$this->id}, Username : $this->username, Nom: {$this->nom}, Prénom: {$this->prenom}, Email: {$this->email}]";
}
+
+ /**
+ * Donne la liste des amis de l'utilisateur
+ *
+ * @return string Les amis de l'utilisateur.
+ */
+ public function getListFriend(): array {
+ return $this->listFriend;
+ }
+
+ /**
+ * Ajoute un utilisateur a sa liste d'amis.
+ *
+ * @param User L'utilisateur a ajouter.
+ */
+ public function addFriend(User $user){
+ array_push($this->listFriend, $user);
+ }
}
?>
\ No newline at end of file
diff --git a/Sources/src/data/model/manager/ActivityManager.php b/Sources/src/data/model/manager/ActivityManager.php
index 6d3147b0..affd3a54 100644
--- a/Sources/src/data/model/manager/ActivityManager.php
+++ b/Sources/src/data/model/manager/ActivityManager.php
@@ -12,8 +12,16 @@
namespace Manager;
use adriangibbons\phpFITFileAnalysis;
+use Database\ActivityGateway;
+use Database\ActivityMapper;
+use Database\Connexion;
+use Database\NotificationGateway;
+use Database\NotificationMapper;
+use DateTime;
use Exception;
use Model\Activity;
+use Model\Athlete;
+use Model\Notification;
use Network\IAuthService;
use Shared\Log;
use Stub\AuthService;
@@ -118,17 +126,25 @@ class ActivityManager
$lastTimestamp = end($monFichierFit->data_mesgs['record']['timestamp']);
// Conversion des timestamps en objets DateTime
- $startDate = \DateTime::createFromFormat('Y-m-d', date('Y-m-d', $firstTimestamp));
- $startTime = \DateTime::createFromFormat('H:i:s', date('H:i:s', $firstTimestamp));
- $endTime = ($lastTimestamp) ? \DateTime::createFromFormat('H:i:s', date('H:i:s', $lastTimestamp)) : null;
+ $startDate = new DateTime();
+// $startDate = $startDate->format('Y-m-d');
+ $startTime = new DateTime();//\DateTime::createFromFormat('H:i:s', date('H:i:s', $firstTimestamp));
+// $startTime = $startTime->format('H:i:s');
+ $endTime = ($lastTimestamp) ? new DateTime() : null;
+// if(!empty($endTime)) {
+// $endTime = $endTime->format('H:i:s');
+// }
// Vérification des conversions en DateTime
if (!$startDate || !$startTime || ($lastTimestamp && !$endTime)) {
throw new \Exception("La conversion en DateTime a échoué.");
+ return false;
}
// Extraction des autres données nécessaires
- $heartRateList = $monFichierFit->data_mesgs['record']['heart_rate'];
+ if(!($heartRateList = $monFichierFit->data_mesgs['record']['heart_rate'])) {
+ throw new \InvalidArgumentException("Fichier .fit ne comportant pas de fréquences cardiaques.\n Fichier Invalide !");
+ }
$variability = max($heartRateList) - min($heartRateList);
$average = number_format(array_sum($heartRateList) / count($heartRateList), 2);
$varianceV = array_sum(array_map(fn($x) => pow($x - $average, 2), $heartRateList)) / count($heartRateList);
@@ -136,7 +152,8 @@ class ActivityManager
$standardDeviation = number_format(sqrt($variance), 2);
$maximum = max($heartRateList);
$minimum = min($heartRateList);
- if(isset($monFichierFit->data_mesgs['record']['temperature'])){
+
+ if(!empty($monFichierFit->data_mesgs['record']['temperature']) && isset($monFichierFit->data_mesgs['record']['temperature'])){
// Extraction de la température moyenne (si disponible
$temperatureList = $monFichierFit->data_mesgs['record']['temperature'];
$averageTemperature = (!empty($temperatureList)) ? number_format(array_sum($temperatureList) / count($temperatureList), 1) : -200;
@@ -145,10 +162,15 @@ class ActivityManager
$averageTemperature = -200;
}
- $isPaused = count($monFichierFit->isPaused()) > 0;
+ if($monFichierFit->data_mesgs['record']['speed']) {
+ $isPaused = count($monFichierFit->isPaused()) > 0;
+ } else {
+ $isPaused = false;
+ }
// Création de l'objet Activity
$newActivity = new Activity(
+ 15,
$type,
$startDate,
$startTime,
@@ -166,9 +188,16 @@ class ActivityManager
// $this->dataManager->activityRepository->add($newActivity);
// if ($this->saveFitFileToJSON($monFichierFit)) {
// Ajout de l'activité et enregistrement du fichier FIT en JSON
- if ($this->authService->getCurrentUser()->getRole()->addActivity($newActivity)) {
+ $activityGateway = new ActivityGateway(new Connexion(DSN, DB_USER, DB_PASSWORD));
+ $map = new ActivityMapper();
+ $activityEntity = $map->activityToEntity($newActivity);
+ if($activityGateway->addActivity($activityEntity)) {
return true;
}
+ // TODO : add the activity
+// if ($this->authService->getCurrentUser()->getRole()->addActivity($newActivity)) {
+// return true;
+// }
// }
diff --git a/Sources/src/data/model/manager/UserManager.php b/Sources/src/data/model/manager/UserManager.php
index 6923816e..af28dbf6 100644
--- a/Sources/src/data/model/manager/UserManager.php
+++ b/Sources/src/data/model/manager/UserManager.php
@@ -132,23 +132,9 @@ class UserManager
{
return $this->dataManager->userRepository->getItemsByName($name, 0, 10);
}
-
- public function getFriends(): array {
- return [
- [
- 'nom' => 'John',
- 'prenom' => 'Doe',
- 'img' => 'test',
- 'username' => 'johndoe',
- ],
- [
- 'nom' => 'Alice',
- 'prenom' => 'Smith',
- 'img' => 'test2',
- 'username' => 'alicesmith',
- ],
- ];
- //return $this->currentUser->getRole()->getUsersList();
+
+ public function getFriends(): array{
+ return $this->currentUser->getRole()->getUsersList();
}
// NEED TO PERSIST
diff --git a/Sources/src/data/model/repository/IUserRepository.php b/Sources/src/data/model/repository/IUserRepository.php
index c46ec3eb..5506c1e6 100644
--- a/Sources/src/data/model/repository/IUserRepository.php
+++ b/Sources/src/data/model/repository/IUserRepository.php
@@ -1,9 +1,10 @@
notifications[] = new Notification(1, 'info', 'Welcome to our service!');
- $this->notifications[] = new Notification(2, 'alert', 'Your subscription is about to expire.');
- $this->notifications[] = new Notification(3, 'info', 'New features available.');
- $this->notifications[] = new Notification(1, 'reminder', 'Don’t forget your upcoming appointment.');
- $this->notifications[] = new Notification(2, 'update', 'Service update completed.');
- // Add more notifications as needed
+ $this->notifications[] = new Notification('info', $date,'Welcome to our service!', '1', 1);
+ $this->notifications[] = new Notification('info', $date,'Welcome to our service!', '1', 1);
+ $this->notifications[] = new Notification('info', $date,'Welcome to our service!', '1', 1);
+ $this->notifications[] = new Notification('info', $date,'Welcome to our service!', '1', 1);
+ $this->notifications[] = new Notification('info', $date,'Welcome to our service!', '1', 1);
}
public function getItemById(int $id)
{
diff --git a/Sources/tests/GatewayTest.php b/Sources/tests/GatewayTest.php
new file mode 100644
index 00000000..8a2a2e16
--- /dev/null
+++ b/Sources/tests/GatewayTest.php
@@ -0,0 +1,215 @@
+getAthlete();
+ //var_dump($result);
+ }
+
+ /* Fonctionne mais en commentaire pour pas add et del a chaque fois
+ public function testAddAthlete(){
+ $dsn = "mysql:host=londres;dbname=dbkemonteiro2;";
+ $username = "kemonteiro2";
+ $password = "#Phpmyadmin63";
+
+ $connexion = new Connexion($dsn,$username,$password);
+
+
+ $athleteGateway = new AthleteGateway($connexion);
+
+ $dateSpecifique = "2023-11-26";
+ $timestamp = strtotime($dateSpecifique);
+ $dateSQL = date("Y-m-d", $timestamp);
+
+ $athleteEntity = new AthleteEntity();
+ $athleteEntity->setNom('John');
+ $athleteEntity->setPrenom('Doe');
+ $athleteEntity->setIdAthlete(1234);
+ $athleteEntity->setEmail('kevin.monteiro@gmail.fr');
+ $athleteEntity->setSexe('H');
+ $athleteEntity->setTaille(169);
+ $athleteEntity->setPoids(69);
+ $athleteEntity->setMotDePasse('motdepasse');
+ $athleteEntity->setDateNaissance($dateSQL);
+
+ $result2 = $athleteGateway->addAthlete($athleteEntity);
+ }
+
+
+ public function testDeleteAthlete(){
+ $dsn = "mysql:host=londres;dbname=dbkemonteiro2;";
+ $username = "kemonteiro2";
+ $password = "#Phpmyadmin63";
+
+ $connexion = new Connexion($dsn,$username,$password);
+
+ $athleteGateway = new AthleteGateway($connexion);
+ $result = $athleteGateway->deleteAthlete( //idAthlete );
+ var_dump($result);
+
+ }*/
+
+ public function testUpdateAthlete(){
+ $dsn = "mysql:host=londres;dbname=dbkemonteiro2;";
+ $username = "kemonteiro2";
+ $password = "#Phpmyadmin63";
+
+ $connexion = new Connexion($dsn,$username,$password);
+
+ $athleteGateway = new AthleteGateway($connexion);
+
+ $dateSpecifique = "2004-08-26";
+ $timestamp = strtotime($dateSpecifique);
+ $dateSQL = date("Y-m-d", $timestamp);
+
+ $athleteEntity = new AthleteEntity();
+ $athleteEntity->setNom('John');
+ $athleteEntity->setPrenom('Doe');
+ $athleteEntity->setIdAthlete(13);
+ $athleteEntity->setEmail('kevin.monteiro@gmail.fr');
+ $athleteEntity->setSexe('H');
+ $athleteEntity->setTaille(169);
+ $athleteEntity->setPoids(69);
+ $athleteEntity->setMotDePasse('motdepasse');
+ $athleteEntity->setDateNaissance($dateSQL);
+ $athleteEntity->setIsCoach(FALSE);
+ $athleteEntity->setCoachId(NULL);
+
+ $athleteEntity2 = new AthleteEntity();
+ $athleteEntity2->setNom('Monteiro');
+ $athleteEntity2->setPrenom('Kevin');
+ $athleteEntity2->setIdAthlete(13);
+ $athleteEntity2->setEmail('kevin.monteiro@gmail.fr');
+ $athleteEntity2->setSexe('H');
+ $athleteEntity2->setTaille(169);
+ $athleteEntity2->setPoids(69);
+ $athleteEntity2->setMotDePasse('motdepasse');
+ $athleteEntity2->setDateNaissance($dateSQL);
+ $athleteEntity2->setIsCoach(TRUE);
+ $athleteEntity2->setCoachId(1);
+
+ $result = $athleteGateway->updateAthlete($athleteEntity, $athleteEntity2);
+ }
+
+ //Partie concernant les Coachs
+
+ public function testGetCoach() {
+
+ //$dsn = "pgsql:host=londres;port=8888;dbname=dbkemonteiro2;user=kemonteiro2;password=Mdp";
+
+ $dsn = "mysql:host=londres;dbname=dbkemonteiro2;";
+ $username = "kemonteiro2";
+ $password = "#Phpmyadmin63";
+
+ $connexion = new Connexion($dsn,$username,$password);
+
+
+ $coachGateway = new CoachGateway($connexion);
+ $result = $coachGateway->getCoach();
+ var_dump($result);
+ }
+ /*
+ //Fonctionne PAS A PARTIR DE LA
+ public function testAddCoach(){
+ $dsn = "mysql:host=londres;dbname=dbkemonteiro2;";
+ $username = "kemonteiro2";
+ $password = "#Phpmyadmin63";
+
+ $connexion = new Connexion($dsn,$username,$password);
+
+
+ $coachGateway = new CoachGateway($connexion);
+
+ $dateSpecifique = "2023-11-26";
+ $timestamp = strtotime($dateSpecifique);
+ $dateSQL = date("Y-m-d", $timestamp);
+
+ $coachEntity = new CoachEntity();
+ $coachEntity->setNom('John');
+ $coachEntity->setPrenom('Doe');
+ $coachEntity->setIdCoach(1234);
+ $coachEntity->setEmail('kevin.monteiro@gmail.fr');
+ $coachEntity->setSexe('H');
+ $coachEntity->setTaille(169);
+ $coachEntity->setPoids(69);
+ $coachEntity->setMotDePasse('motdepasse');
+ $coachEntity->setDateNaissance($dateSQL);
+
+ $result2 = $coachGateway->addCoach($coachEntity);
+ }
+
+
+ public function testDeleteAthlete(){
+ $dsn = "mysql:host=londres;dbname=dbkemonteiro2;";
+ $username = "kemonteiro2";
+ $password = "#Phpmyadmin63";
+
+ $connexion = new Connexion($dsn,$username,$password);
+
+ $athleteGateway = new AthleteGateway($connexion);
+ $result = $athleteGateway->deleteAthlete( //idAthlete );
+ var_dump($result);
+
+ }*/
+ /*
+ public function testUpdateAthlete(){
+ $dsn = "mysql:host=londres;dbname=dbkemonteiro2;";
+ $username = "kemonteiro2";
+ $password = "#Phpmyadmin63";
+
+ $connexion = new Connexion($dsn,$username,$password);
+
+ $athleteGateway = new AthleteGateway($connexion);
+
+ $dateSpecifique = "2004-08-26";
+ $timestamp = strtotime($dateSpecifique);
+ $dateSQL = date("Y-m-d", $timestamp);
+
+ $athleteEntity = new AthleteEntity();
+ $athleteEntity->setNom('John');
+ $athleteEntity->setPrenom('Doe');
+ $athleteEntity->setIdAthlete(13);
+ $athleteEntity->setEmail('kevin.monteiro@gmail.fr');
+ $athleteEntity->setSexe('H');
+ $athleteEntity->setTaille(169);
+ $athleteEntity->setPoids(69);
+ $athleteEntity->setMotDePasse('motdepasse');
+ $athleteEntity->setDateNaissance($dateSQL);
+
+ $athleteEntity2 = new AthleteEntity();
+ $athleteEntity2->setNom('Monteiro');
+ $athleteEntity2->setPrenom('Kevin');
+ $athleteEntity2->setIdAthlete(13);
+ $athleteEntity2->setEmail('kevin.monteiro@gmail.fr');
+ $athleteEntity2->setSexe('H');
+ $athleteEntity2->setTaille(169);
+ $athleteEntity2->setPoids(69);
+ $athleteEntity2->setMotDePasse('motdepasse');
+ $athleteEntity2->setDateNaissance($dateSQL);
+
+ $result = $athleteGateway->updateAthlete($athleteEntity, $athleteEntity2);
+ }*/
+}
diff --git a/Sources/tests/MapperTest.php b/Sources/tests/MapperTest.php
new file mode 100644
index 00000000..2e5565a0
--- /dev/null
+++ b/Sources/tests/MapperTest.php
@@ -0,0 +1,43 @@
+getAthlete();
+
+ $map = new AthleteMapper ();
+ //SQL To AthleteEntity
+ $athleteEntity = $map->athleteSqlToEntity($result);
+
+
+ foreach($athleteEntity as $ath){
+
+ $result = $ath->getNom();
+ var_dump($result);
+ //Pour chaque AthleteEntity : Athlete Entity To User avec Role Athlete(Model)
+ $user = $map->athleteEntityToModel($ath);
+ var_dump($user->getId());
+ //Pour chaque Athlete du Model -> Athlete Entity
+ $res = $map->athleteToEntity($user);
+ var_dump($res->getIdAthlete());
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/tests/loginDatabase.php b/Sources/tests/loginDatabase.php
new file mode 100644
index 00000000..97c9dc4a
--- /dev/null
+++ b/Sources/tests/loginDatabase.php
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/Sources/vendor/composer/autoload_classmap.php b/Sources/vendor/composer/autoload_classmap.php
index b61fe968..034369e1 100644
--- a/Sources/vendor/composer/autoload_classmap.php
+++ b/Sources/vendor/composer/autoload_classmap.php
@@ -255,6 +255,7 @@ return array(
'PHPUnit\\Framework\\Attributes\\ExcludeStaticPropertyFromBackup' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php',
'PHPUnit\\Framework\\Attributes\\Group' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Group.php',
'PHPUnit\\Framework\\Attributes\\IgnoreClassForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreClassForCodeCoverage.php',
+ 'PHPUnit\\Framework\\Attributes\\IgnoreDeprecations' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php',
'PHPUnit\\Framework\\Attributes\\IgnoreFunctionForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreFunctionForCodeCoverage.php',
'PHPUnit\\Framework\\Attributes\\IgnoreMethodForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreMethodForCodeCoverage.php',
'PHPUnit\\Framework\\Attributes\\Large' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Large.php',
@@ -471,6 +472,8 @@ return array(
'PHPUnit\\Logging\\JUnit\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFailedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFinishedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestMarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestMarkedIncompleteSubscriber.php',
+ 'PHPUnit\\Logging\\JUnit\\TestPreparationFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationFailedSubscriber.php',
+ 'PHPUnit\\Logging\\JUnit\\TestPreparationStartedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationStartedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestRunnerExecutionFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestRunnerExecutionFinishedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSkippedSubscriber.php',
@@ -491,26 +494,19 @@ return array(
'PHPUnit\\Logging\\TestDox\\HtmlRenderer' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php',
'PHPUnit\\Logging\\TestDox\\NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/NamePrettifier.php',
'PHPUnit\\Logging\\TestDox\\PlainTextRenderer' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php',
- 'PHPUnit\\Logging\\TestDox\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/Subscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestConsideredRiskySubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestConsideredRiskySubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedMockObjectForAbstractClassSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedMockObjectForAbstractClassSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedMockObjectForTraitSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedMockObjectForTraitSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedMockObjectFromWsdlSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedMockObjectFromWsdlSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedMockObjectSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedMockObjectSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedPartialMockObjectSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedPartialMockObjectSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedTestProxySubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedTestProxySubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedTestStubSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedTestStubSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestErroredSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestFailedSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestFinishedSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestMarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestMarkedIncompleteSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestPassedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestPassedSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestPreparedSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/TestResult.php',
- 'PHPUnit\\Logging\\TestDox\\TestResultCollection' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/TestResultCollection.php',
- 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/TestResultCollectionIterator.php',
- 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/TestResultCollector.php',
- 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestSkippedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/Subscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestConsideredRiskySubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestConsideredRiskySubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestErroredSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestErroredSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFailedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFinishedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestMarkedIncompleteSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestPassedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPassedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPreparedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResult.php',
+ 'PHPUnit\\Logging\\TestDox\\TestResultCollection' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollection.php',
+ 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php',
+ 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php',
+ 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php',
'PHPUnit\\Metadata\\After' => $vendorDir . '/phpunit/phpunit/src/Metadata/After.php',
'PHPUnit\\Metadata\\AfterClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/AfterClass.php',
'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php',
@@ -540,6 +536,7 @@ return array(
'PHPUnit\\Metadata\\ExcludeStaticPropertyFromBackup' => $vendorDir . '/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php',
'PHPUnit\\Metadata\\Group' => $vendorDir . '/phpunit/phpunit/src/Metadata/Group.php',
'PHPUnit\\Metadata\\IgnoreClassForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreClassForCodeCoverage.php',
+ 'PHPUnit\\Metadata\\IgnoreDeprecations' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php',
'PHPUnit\\Metadata\\IgnoreFunctionForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreFunctionForCodeCoverage.php',
'PHPUnit\\Metadata\\IgnoreMethodForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreMethodForCodeCoverage.php',
'PHPUnit\\Metadata\\InvalidVersionRequirementException' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php',
@@ -599,6 +596,7 @@ return array(
'PHPUnit\\Runner\\ClassIsAbstractException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php',
'PHPUnit\\Runner\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Runner/CodeCoverage.php',
'PHPUnit\\Runner\\DirectoryCannotBeCreatedException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/DirectoryCannotBeCreatedException.php',
+ 'PHPUnit\\Runner\\ErrorException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ErrorException.php',
'PHPUnit\\Runner\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/ErrorHandler.php',
'PHPUnit\\Runner\\Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/Exception.php',
'PHPUnit\\Runner\\Extension\\Extension' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/Extension.php',
diff --git a/Sources/vendor/composer/autoload_psr4.php b/Sources/vendor/composer/autoload_psr4.php
index 3369793b..7d78eeb5 100644
--- a/Sources/vendor/composer/autoload_psr4.php
+++ b/Sources/vendor/composer/autoload_psr4.php
@@ -12,24 +12,22 @@ return array(
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'Stub\\' => array($baseDir . '/src/data/stub', $baseDir . '/src/data/stub/service', $baseDir . '/src/data/stub/repository'),
- 'Repository\\' => array($baseDir . '/src/data/model/repository'),
- 'Network\\' => array($baseDir . '/src/data/core/network'),
- 'Model\\' => array($baseDir . '/src/data/model'),
- 'Manager\\' => array($baseDir . '/src/data/model/manager'),
- 'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
- 'Data\\' => array($baseDir . '/src/data'),
'Shared\\Exception\\' => array($baseDir . '/src/shared/exception'),
'Shared\\Attributes\\' => array($baseDir . '/src/shared/attributes'),
'Shared\\' => array($baseDir . '/src/shared'),
+ 'Repository\\' => array($baseDir . '/src/data/model/repository'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'),
- 'Repository\\' => array($baseDir . '/src/data/model/repository'),
'Network\\' => array($baseDir . '/src/data/core/network'),
+ 'Model\\' => array($baseDir . '/src/data/model'),
+ 'Manager\\' => array($baseDir . '/src/data/model/manager'),
+ 'Json\\' => array($baseDir . '/src/data/core/json'),
'Hearttrack\\' => array($baseDir . '/src'),
'GrahamCampbell\\ResultType\\' => array($vendorDir . '/graham-campbell/result-type/src'),
'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
+ 'Database\\' => array($baseDir . '/src/data/core/database'),
'Data\\Core\\' => array($baseDir . '/src/data/core'),
'Data\\' => array($baseDir . '/src/data'),
'Console\\' => array($baseDir . '/src/console'),
diff --git a/Sources/vendor/composer/autoload_static.php b/Sources/vendor/composer/autoload_static.php
index ead2b76e..f8d6fde8 100644
--- a/Sources/vendor/composer/autoload_static.php
+++ b/Sources/vendor/composer/autoload_static.php
@@ -52,6 +52,10 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'Model\\' => 6,
'Manager\\' => 8,
),
+ 'J' =>
+ array (
+ 'Json\\' => 5,
+ ),
'H' =>
array (
'Hearttrack\\' => 11,
@@ -63,10 +67,10 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'D' =>
array (
'Dotenv\\' => 7,
- 'Data\\' => 5,
- 'Doctrine\\Instantiator\\' => 22,
'DeepCopy\\' => 9,
+ 'Database\\' => 9,
'Data\\Core\\' => 10,
+ 'Data\\' => 5,
),
'C' =>
array (
@@ -105,29 +109,29 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
),
- 'Stub\\' =>
+ 'Stub\\' =>
array (
0 => __DIR__ . '/../..' . '/src/data/stub',
1 => __DIR__ . '/../..' . '/src/data/stub/service',
2 => __DIR__ . '/../..' . '/src/data/stub/repository',
),
- 'Shared\\Exception\\' =>
+ 'Shared\\Exception\\' =>
array (
0 => __DIR__ . '/../..' . '/src/shared/exception',
),
- 'Shared\\Attributes\\' =>
+ 'Shared\\Attributes\\' =>
array (
0 => __DIR__ . '/../..' . '/src/shared/attributes',
),
- 'Shared\\' =>
+ 'Shared\\' =>
array (
0 => __DIR__ . '/../..' . '/src/shared',
),
- 'Repository\\' =>
+ 'Repository\\' =>
array (
0 => __DIR__ . '/../..' . '/src/data/model/repository',
),
- 'Psr\\Container\\' =>
+ 'Psr\\Container\\' =>
array (
0 => __DIR__ . '/..' . '/psr/container/src',
),
@@ -139,7 +143,7 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
array (
0 => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption',
),
- 'Network\\' =>
+ 'Network\\' =>
array (
0 => __DIR__ . '/../..' . '/src/data/core/network',
),
@@ -151,7 +155,11 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
array (
0 => __DIR__ . '/../..' . '/src/data/model/manager',
),
- 'Hearttrack\\' =>
+ 'Json\\' =>
+ array (
+ 0 => __DIR__ . '/../..' . '/src/data/core/json',
+ ),
+ 'Hearttrack\\' =>
array (
0 => __DIR__ . '/../..' . '/src',
),
@@ -163,19 +171,15 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
array (
0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src',
),
- 'Doctrine\\Instantiator\\' =>
+ 'DeepCopy\\' =>
array (
- 0 => __DIR__ . '/..' . '/graham-campbell/result-type/src',
- ),
- 'Dotenv\\' =>
- array (
- 0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src',
+ 0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
),
- 'DeepCopy\\' =>
+ 'Database\\' =>
array (
- 0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
+ 0 => __DIR__ . '/../..' . '/src/data/core/database',
),
- 'Data\\Core\\' =>
+ 'Data\\Core\\' =>
array (
0 => __DIR__ . '/../..' . '/src/data/core',
),
@@ -187,7 +191,7 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
array (
0 => __DIR__ . '/../..' . '/src/console',
),
- 'App\\Views\\Directives\\' =>
+ 'App\\Views\\Directives\\' =>
array (
0 => __DIR__ . '/../..' . '/src/app/views/directives',
),
@@ -467,6 +471,7 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Framework\\Attributes\\ExcludeStaticPropertyFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php',
'PHPUnit\\Framework\\Attributes\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Group.php',
'PHPUnit\\Framework\\Attributes\\IgnoreClassForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreClassForCodeCoverage.php',
+ 'PHPUnit\\Framework\\Attributes\\IgnoreDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php',
'PHPUnit\\Framework\\Attributes\\IgnoreFunctionForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreFunctionForCodeCoverage.php',
'PHPUnit\\Framework\\Attributes\\IgnoreMethodForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreMethodForCodeCoverage.php',
'PHPUnit\\Framework\\Attributes\\Large' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Large.php',
@@ -683,6 +688,8 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Logging\\JUnit\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFailedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestFinishedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestMarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestMarkedIncompleteSubscriber.php',
+ 'PHPUnit\\Logging\\JUnit\\TestPreparationFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationFailedSubscriber.php',
+ 'PHPUnit\\Logging\\JUnit\\TestPreparationStartedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparationStartedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestPreparedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestRunnerExecutionFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestRunnerExecutionFinishedSubscriber.php',
'PHPUnit\\Logging\\JUnit\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/JUnit/Subscriber/TestSkippedSubscriber.php',
@@ -703,26 +710,19 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Logging\\TestDox\\HtmlRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/HtmlRenderer.php',
'PHPUnit\\Logging\\TestDox\\NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/NamePrettifier.php',
'PHPUnit\\Logging\\TestDox\\PlainTextRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php',
- 'PHPUnit\\Logging\\TestDox\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/Subscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestConsideredRiskySubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestConsideredRiskySubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedMockObjectForAbstractClassSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedMockObjectForAbstractClassSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedMockObjectForTraitSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedMockObjectForTraitSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedMockObjectFromWsdlSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedMockObjectFromWsdlSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedMockObjectSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedMockObjectSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedPartialMockObjectSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedPartialMockObjectSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedTestProxySubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedTestProxySubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestCreatedTestStubSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestCreatedTestStubSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestErroredSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestFailedSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestFinishedSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestMarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestMarkedIncompleteSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestPassedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestPassedSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestPreparedSubscriber.php',
- 'PHPUnit\\Logging\\TestDox\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/TestResult.php',
- 'PHPUnit\\Logging\\TestDox\\TestResultCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/TestResultCollection.php',
- 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/TestResultCollectionIterator.php',
- 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/TestResultCollector.php',
- 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestMethod/Subscriber/TestSkippedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/Subscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestConsideredRiskySubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestConsideredRiskySubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestErroredSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestErroredSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFailedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestFinishedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestMarkedIncompleteSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestMarkedIncompleteSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestPassedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPassedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestPreparedSubscriber.php',
+ 'PHPUnit\\Logging\\TestDox\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResult.php',
+ 'PHPUnit\\Logging\\TestDox\\TestResultCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollection.php',
+ 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php',
+ 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php',
+ 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php',
'PHPUnit\\Metadata\\After' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/After.php',
'PHPUnit\\Metadata\\AfterClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/AfterClass.php',
'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php',
@@ -752,6 +752,7 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Metadata\\ExcludeStaticPropertyFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php',
'PHPUnit\\Metadata\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Group.php',
'PHPUnit\\Metadata\\IgnoreClassForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreClassForCodeCoverage.php',
+ 'PHPUnit\\Metadata\\IgnoreDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php',
'PHPUnit\\Metadata\\IgnoreFunctionForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreFunctionForCodeCoverage.php',
'PHPUnit\\Metadata\\IgnoreMethodForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreMethodForCodeCoverage.php',
'PHPUnit\\Metadata\\InvalidVersionRequirementException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php',
@@ -811,6 +812,7 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Runner\\ClassIsAbstractException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php',
'PHPUnit\\Runner\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/CodeCoverage.php',
'PHPUnit\\Runner\\DirectoryCannotBeCreatedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/DirectoryCannotBeCreatedException.php',
+ 'PHPUnit\\Runner\\ErrorException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ErrorException.php',
'PHPUnit\\Runner\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ErrorHandler.php',
'PHPUnit\\Runner\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/Exception.php',
'PHPUnit\\Runner\\Extension\\Extension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/Extension.php',
diff --git a/Sources/vendor/composer/installed.json b/Sources/vendor/composer/installed.json
index c5a21d6b..17169bbb 100644
--- a/Sources/vendor/composer/installed.json
+++ b/Sources/vendor/composer/installed.json
@@ -99,177 +99,6 @@
},
"install-path": "../altorouter/altorouter"
},
- {
- "name": "doctrine/instantiator",
- "version": "1.5.0",
- "version_normalized": "1.5.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/adriangibbons/php-fit-file-analysis.git",
- "reference": "8efd36b1b963f01c42dc5329626519c040dec664"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/adriangibbons/php-fit-file-analysis/zipball/8efd36b1b963f01c42dc5329626519c040dec664",
- "reference": "8efd36b1b963f01c42dc5329626519c040dec664",
- "shasum": ""
- },
- "require-dev": {
- "phpunit/phpunit": "4.8.*",
- "satooshi/php-coveralls": "^2.0",
- "squizlabs/php_codesniffer": "2.*"
- },
- "time": "2019-11-20T06:58:56+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "adriangibbons\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "description": "A PHP class for analysing FIT files created by Garmin GPS devices",
- "homepage": "https://github.com/adriangibbons/php-fit-file-analysis",
- "keywords": [
- "Fit",
- "garmin"
- ],
- "support": {
- "issues": "https://github.com/adriangibbons/php-fit-file-analysis/issues",
- "source": "https://github.com/adriangibbons/php-fit-file-analysis/tree/master"
- },
- "install-path": "../adriangibbons/php-fit-file-analysis"
- },
- {
- "name": "graham-campbell/result-type",
- "version": "v1.1.2",
- "version_normalized": "1.1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/GrahamCampbell/Result-Type.git",
- "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862",
- "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862",
- "shasum": ""
- },
- "require": {
- "php": "^7.2.5 || ^8.0",
- "phpoption/phpoption": "^1.9.2"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
- },
- "time": "2023-11-12T22:16:48+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "GrahamCampbell\\ResultType\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- }
- ],
- "description": "An Implementation Of The Result Type",
- "keywords": [
- "Graham Campbell",
- "GrahamCampbell",
- "Result Type",
- "Result-Type",
- "result"
- ],
- "support": {
- "issues": "https://github.com/GrahamCampbell/Result-Type/issues",
- "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2"
- },
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type",
- "type": "tidelift"
- }
- ],
- "install-path": "../graham-campbell/result-type"
- },
- {
- "name": "graham-campbell/result-type",
- "version": "v1.1.2",
- "version_normalized": "1.1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/GrahamCampbell/Result-Type.git",
- "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862",
- "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862",
- "shasum": ""
- },
- "require": {
- "php": "^7.2.5 || ^8.0",
- "phpoption/phpoption": "^1.9.2"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
- },
- "time": "2023-11-12T22:16:48+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "GrahamCampbell\\ResultType\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- }
- ],
- "description": "An Implementation Of The Result Type",
- "keywords": [
- "Graham Campbell",
- "GrahamCampbell",
- "Result Type",
- "Result-Type",
- "result"
- ],
- "support": {
- "issues": "https://github.com/GrahamCampbell/Result-Type/issues",
- "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2"
- },
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type",
- "type": "tidelift"
- }
- ],
- "install-path": "../graham-campbell/result-type"
- },
{
"name": "graham-campbell/result-type",
"version": "v1.1.2",
@@ -399,35 +228,37 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.17.1",
- "version_normalized": "4.17.1.0",
+ "version": "v5.0.0",
+ "version_normalized": "5.0.0.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d"
+ "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
- "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc",
+ "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc",
"shasum": ""
},
"require": {
+ "ext-ctype": "*",
+ "ext-json": "*",
"ext-tokenizer": "*",
- "php": ">=7.0"
+ "php": ">=7.4"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
- "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
+ "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
},
- "time": "2023-08-13T19:53:39+00:00",
+ "time": "2024-01-07T17:17:35+00:00",
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.9-dev"
+ "dev-master": "5.0-dev"
}
},
"installation-source": "dist",
@@ -452,7 +283,7 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0"
},
"install-path": "../nikic/php-parser"
},
@@ -653,102 +484,24 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "10.1.9",
- "version_normalized": "10.1.9.0",
- "source": {
- "type": "git",
- "url": "https://github.com/schmittjoh/php-option.git",
- "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820",
- "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820",
- "shasum": ""
- },
- "require": {
- "php": "^7.2.5 || ^8.0"
- },
- "require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.2",
- "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
- },
- "time": "2023-11-12T21:59:55+00:00",
- "type": "library",
- "extra": {
- "bamarni-bin": {
- "bin-links": true,
- "forward-command": true
- },
- "branch-alias": {
- "dev-master": "1.9-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "PhpOption\\": "src/PhpOption/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "Johannes M. Schmitt",
- "email": "schmittjoh@gmail.com",
- "homepage": "https://github.com/schmittjoh"
- },
- {
- "name": "Graham Campbell",
- "email": "hello@gjcampbell.co.uk",
- "homepage": "https://github.com/GrahamCampbell"
- }
- ],
- "description": "Option Type for PHP",
- "keywords": [
- "language",
- "option",
- "php",
- "type"
- ],
- "support": {
- "issues": "https://github.com/schmittjoh/php-option/issues",
- "source": "https://github.com/schmittjoh/php-option/tree/1.9.2"
- },
- "funding": [
- {
- "url": "https://github.com/GrahamCampbell",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption",
- "type": "tidelift"
- }
- ],
- "install-path": "../phpoption/phpoption"
- },
- {
- "name": "phpunit/php-code-coverage",
- "version": "10.1.9",
- "version_normalized": "10.1.9.0",
+ "version": "10.1.11",
+ "version_normalized": "10.1.11.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735"
+ "reference": "78c3b7625965c2513ee96569a4dbb62601784145"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a56a9ab2f680246adcf3db43f38ddf1765774735",
- "reference": "a56a9ab2f680246adcf3db43f38ddf1765774735",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/78c3b7625965c2513ee96569a4dbb62601784145",
+ "reference": "78c3b7625965c2513ee96569a4dbb62601784145",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
- "nikic/php-parser": "^4.15",
+ "nikic/php-parser": "^4.18 || ^5.0",
"php": ">=8.1",
"phpunit/php-file-iterator": "^4.0",
"phpunit/php-text-template": "^3.0",
@@ -766,7 +519,7 @@
"ext-pcov": "PHP extension that provides line coverage",
"ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
},
- "time": "2023-11-23T12:23:20+00:00",
+ "time": "2023-12-21T15:38:30+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -800,7 +553,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.9"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.11"
},
"funding": [
{
@@ -1067,17 +820,17 @@
},
{
"name": "phpunit/phpunit",
- "version": "10.4.2",
- "version_normalized": "10.4.2.0",
+ "version": "10.5.5",
+ "version_normalized": "10.5.5.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1"
+ "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cacd8b9dd224efa8eb28beb69004126c7ca1a1a1",
- "reference": "cacd8b9dd224efa8eb28beb69004126c7ca1a1a1",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ed21115d505b4b4f7dc7b5651464e19a2c7f7856",
+ "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856",
"shasum": ""
},
"require": {
@@ -1111,14 +864,14 @@
"suggest": {
"ext-soap": "To be able to generate mocks based on WSDL files"
},
- "time": "2023-10-26T07:21:45+00:00",
+ "time": "2023-12-27T15:13:52+00:00",
"bin": [
"phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "10.4-dev"
+ "dev-main": "10.5-dev"
}
},
"installation-source": "dist",
@@ -1151,7 +904,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/10.4.2"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.5"
},
"funding": [
{
@@ -1225,62 +978,6 @@
},
"install-path": "../psr/container"
},
- {
- "name": "sebastian/cli-parser",
- "version": "2.0.0",
- "version_normalized": "2.0.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/container.git",
- "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
- "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
- "shasum": ""
- },
- "require": {
- "php": ">=7.4.0"
- },
- "time": "2021-11-05T16:47:00+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Container\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common Container Interface (PHP FIG PSR-11)",
- "homepage": "https://github.com/php-fig/container",
- "keywords": [
- "PSR-11",
- "container",
- "container-interface",
- "container-interop",
- "psr"
- ],
- "support": {
- "issues": "https://github.com/php-fig/container/issues",
- "source": "https://github.com/php-fig/container/tree/2.0.2"
- },
- "install-path": "../psr/container"
- },
{
"name": "sebastian/cli-parser",
"version": "2.0.0",
@@ -1539,31 +1236,31 @@
},
{
"name": "sebastian/complexity",
- "version": "3.1.0",
- "version_normalized": "3.1.0.0",
+ "version": "3.2.0",
+ "version_normalized": "3.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "68cfb347a44871f01e33ab0ef8215966432f6957"
+ "reference": "68ff824baeae169ec9f2137158ee529584553799"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68cfb347a44871f01e33ab0ef8215966432f6957",
- "reference": "68cfb347a44871f01e33ab0ef8215966432f6957",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799",
+ "reference": "68ff824baeae169ec9f2137158ee529584553799",
"shasum": ""
},
"require": {
- "nikic/php-parser": "^4.10",
+ "nikic/php-parser": "^4.18 || ^5.0",
"php": ">=8.1"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
},
- "time": "2023-09-28T11:50:59+00:00",
+ "time": "2023-12-21T08:37:17+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "3.1-dev"
+ "dev-main": "3.2-dev"
}
},
"installation-source": "dist",
@@ -1588,7 +1285,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
"security": "https://github.com/sebastianbergmann/complexity/security/policy",
- "source": "https://github.com/sebastianbergmann/complexity/tree/3.1.0"
+ "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0"
},
"funding": [
{
@@ -1600,17 +1297,17 @@
},
{
"name": "sebastian/diff",
- "version": "5.0.3",
- "version_normalized": "5.0.3.0",
+ "version": "5.1.0",
+ "version_normalized": "5.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b"
+ "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
- "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/fbf413a49e54f6b9b17e12d900ac7f6101591b7f",
+ "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f",
"shasum": ""
},
"require": {
@@ -1620,11 +1317,11 @@
"phpunit/phpunit": "^10.0",
"symfony/process": "^4.2 || ^5"
},
- "time": "2023-05-01T07:48:21+00:00",
+ "time": "2023-12-22T10:55:06+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "5.0-dev"
+ "dev-main": "5.1-dev"
}
},
"installation-source": "dist",
@@ -1658,7 +1355,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
"security": "https://github.com/sebastianbergmann/diff/security/policy",
- "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3"
+ "source": "https://github.com/sebastianbergmann/diff/tree/5.1.0"
},
"funding": [
{
@@ -1883,27 +1580,27 @@
},
{
"name": "sebastian/lines-of-code",
- "version": "2.0.1",
- "version_normalized": "2.0.1.0",
+ "version": "2.0.2",
+ "version_normalized": "2.0.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d"
+ "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d",
- "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0",
+ "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0",
"shasum": ""
},
"require": {
- "nikic/php-parser": "^4.10",
+ "nikic/php-parser": "^4.18 || ^5.0",
"php": ">=8.1"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
},
- "time": "2023-08-31T09:25:50+00:00",
+ "time": "2023-12-21T08:38:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -1932,7 +1629,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
"security": "https://github.com/sebastianbergmann/lines-of-code/security/policy",
- "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1"
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2"
},
"funding": [
{
diff --git a/Sources/vendor/composer/installed.php b/Sources/vendor/composer/installed.php
index 5c38c8e3..10c45558 100644
--- a/Sources/vendor/composer/installed.php
+++ b/Sources/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'hearttrack/package',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'eb625309ce4a814abafb1d0ded3d0d5937ddc905',
+ 'reference' => 'e86b3f7b002e2852b5084d5448b98251eec6e846',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -28,33 +28,6 @@
'aliases' => array(),
'dev_requirement' => false,
),
- 'doctrine/instantiator' => array(
- 'pretty_version' => '1.5.0',
- 'version' => '1.5.0.0',
- 'reference' => '0a0fa9780f5d4e507415a065172d26a98d02047b',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../adriangibbons/php-fit-file-analysis',
- 'aliases' => array(),
- 'dev_requirement' => false,
- ),
- 'graham-campbell/result-type' => array(
- 'pretty_version' => 'v1.1.2',
- 'version' => '1.1.2.0',
- 'reference' => 'fbd48bce38f73f8a4ec8583362e732e4095e5862',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../graham-campbell/result-type',
- 'aliases' => array(),
- 'dev_requirement' => false,
- ),
- 'graham-campbell/result-type' => array(
- 'pretty_version' => 'v1.1.2',
- 'version' => '1.1.2.0',
- 'reference' => 'fbd48bce38f73f8a4ec8583362e732e4095e5862',
- 'type' => 'library',
- 'install_path' => __DIR__ . '/../graham-campbell/result-type',
- 'aliases' => array(),
- 'dev_requirement' => false,
- ),
'graham-campbell/result-type' => array(
'pretty_version' => 'v1.1.2',
'version' => '1.1.2.0',
@@ -67,7 +40,7 @@
'hearttrack/package' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'eb625309ce4a814abafb1d0ded3d0d5937ddc905',
+ 'reference' => 'e86b3f7b002e2852b5084d5448b98251eec6e846',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -83,9 +56,9 @@
'dev_requirement' => true,
),
'nikic/php-parser' => array(
- 'pretty_version' => 'v4.17.1',
- 'version' => '4.17.1.0',
- 'reference' => 'a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d',
+ 'pretty_version' => 'v5.0.0',
+ 'version' => '5.0.0.0',
+ 'reference' => '4a21235f7e56e713259a6f76bf4b5ea08502b9dc',
'type' => 'library',
'install_path' => __DIR__ . '/../nikic/php-parser',
'aliases' => array(),
@@ -119,9 +92,9 @@
'dev_requirement' => false,
),
'phpunit/php-code-coverage' => array(
- 'pretty_version' => '10.1.9',
- 'version' => '10.1.9.0',
- 'reference' => 'a56a9ab2f680246adcf3db43f38ddf1765774735',
+ 'pretty_version' => '10.1.11',
+ 'version' => '10.1.11.0',
+ 'reference' => '78c3b7625965c2513ee96569a4dbb62601784145',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
'aliases' => array(),
@@ -164,9 +137,9 @@
'dev_requirement' => true,
),
'phpunit/phpunit' => array(
- 'pretty_version' => '10.4.2',
- 'version' => '10.4.2.0',
- 'reference' => 'cacd8b9dd224efa8eb28beb69004126c7ca1a1a1',
+ 'pretty_version' => '10.5.5',
+ 'version' => '10.5.5.0',
+ 'reference' => 'ed21115d505b4b4f7dc7b5651464e19a2c7f7856',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(),
@@ -218,18 +191,18 @@
'dev_requirement' => true,
),
'sebastian/complexity' => array(
- 'pretty_version' => '3.1.0',
- 'version' => '3.1.0.0',
- 'reference' => '68cfb347a44871f01e33ab0ef8215966432f6957',
+ 'pretty_version' => '3.2.0',
+ 'version' => '3.2.0.0',
+ 'reference' => '68ff824baeae169ec9f2137158ee529584553799',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/complexity',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/diff' => array(
- 'pretty_version' => '5.0.3',
- 'version' => '5.0.3.0',
- 'reference' => '912dc2fbe3e3c1e7873313cc801b100b6c68c87b',
+ 'pretty_version' => '5.1.0',
+ 'version' => '5.1.0.0',
+ 'reference' => 'fbf413a49e54f6b9b17e12d900ac7f6101591b7f',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/diff',
'aliases' => array(),
@@ -263,9 +236,9 @@
'dev_requirement' => true,
),
'sebastian/lines-of-code' => array(
- 'pretty_version' => '2.0.1',
- 'version' => '2.0.1.0',
- 'reference' => '649e40d279e243d985aa8fb6e74dd5bb28dc185d',
+ 'pretty_version' => '2.0.2',
+ 'version' => '2.0.2.0',
+ 'reference' => '856e7f6a75a84e339195d48c556f23be2ebf75d0',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/lines-of-code',
'aliases' => array(),
diff --git a/Sources/vendor/nikic/php-parser/.php-cs-fixer.dist.php b/Sources/vendor/nikic/php-parser/.php-cs-fixer.dist.php
new file mode 100644
index 00000000..314307ef
--- /dev/null
+++ b/Sources/vendor/nikic/php-parser/.php-cs-fixer.dist.php
@@ -0,0 +1,31 @@
+exclude('PhpParser/Parser')
+ ->in(__DIR__ . '/lib')
+ ->in(__DIR__ . '/test')
+ ->in(__DIR__ . '/grammar')
+;
+
+$config = new PhpCsFixer\Config();
+return $config->setRiskyAllowed(true)
+ ->setRules([
+ '@PSR12' => true,
+ // We use PSR12 with consistent brace placement.
+ 'curly_braces_position' => [
+ 'functions_opening_brace' => 'same_line',
+ 'classes_opening_brace' => 'same_line',
+ ],
+ // declare(strict_types=1) on the same line as false,
+ 'declare_strict_types' => true,
+ // Keep argument formatting for now.
+ 'method_argument_space' => ['on_multiline' => 'ignore'],
+ 'phpdoc_align' => ['align' => 'left'],
+ 'phpdoc_trim' => true,
+ 'no_empty_phpdoc' => true,
+ 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
+ 'no_extra_blank_lines' => true,
+ ])
+ ->setFinder($finder)
+;
diff --git a/Sources/vendor/nikic/php-parser/Makefile b/Sources/vendor/nikic/php-parser/Makefile
new file mode 100644
index 00000000..9a7bdf2d
--- /dev/null
+++ b/Sources/vendor/nikic/php-parser/Makefile
@@ -0,0 +1,10 @@
+.PHONY: phpstan php-cs-fixer
+
+tools/vendor:
+ composer install -d tools
+
+phpstan: tools/vendor
+ tools/vendor/bin/phpstan
+
+php-cs-fixer: tools/vendor
+ tools/vendor/bin/php-cs-fixer fix
diff --git a/Sources/vendor/nikic/php-parser/README.md b/Sources/vendor/nikic/php-parser/README.md
index 36de23cd..7555838e 100644
--- a/Sources/vendor/nikic/php-parser/README.md
+++ b/Sources/vendor/nikic/php-parser/README.md
@@ -3,24 +3,24 @@ PHP Parser
[](https://coveralls.io/github/nikic/PHP-Parser?branch=master)
-This is a PHP 5.2 to PHP 8.2 parser written in PHP. Its purpose is to simplify static code analysis and
+This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and
manipulation.
-[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2).
+[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x).
-[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2).
+[Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3).
Features
--------
The main features provided by this library are:
- * Parsing PHP 5, PHP 7, and PHP 8 code into an abstract syntax tree (AST).
+ * Parsing PHP 7, and PHP 8 code into an abstract syntax tree (AST).
* Invalid code can be parsed into a partial AST.
* The AST contains accurate location information.
* Dumping the AST in human-readable form.
* Converting an AST back to PHP code.
- * Experimental: Formatting can be preserved for partially changed ASTs.
+ * Formatting can be preserved for partially changed ASTs.
* Infrastructure to traverse and modify ASTs.
* Resolution of namespaced names.
* Evaluation of constant expressions.
@@ -51,7 +51,7 @@ function test($foo)
}
CODE;
-$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
+$parser = (new ParserFactory())->createForNewestSupportedVersion();
try {
$ast = $parser->parse($code);
} catch (Error $error) {
@@ -68,12 +68,17 @@ This dumps an AST looking something like this:
```
array(
0: Stmt_Function(
+ attrGroups: array(
+ )
byRef: false
name: Identifier(
name: test
)
params: array(
0: Param(
+ attrGroups: array(
+ )
+ flags: 0
type: null
byRef: false
variadic: false
@@ -88,12 +93,11 @@ array(
0: Stmt_Expression(
expr: Expr_FuncCall(
name: Name(
- parts: array(
- 0: var_dump
- )
+ name: var_dump
)
args: array(
0: Arg(
+ name: null
value: Expr_Variable(
name: foo
)
@@ -135,12 +139,16 @@ This gives us an AST where the `Function_::$stmts` are empty:
```
array(
0: Stmt_Function(
+ attrGroups: array(
+ )
byRef: false
name: Identifier(
name: test
)
params: array(
0: Param(
+ attrGroups: array(
+ )
type: null
byRef: false
variadic: false
@@ -203,9 +211,8 @@ Component documentation:
* [AST builders](doc/component/AST_builders.markdown)
* Fluent builders for AST nodes
* [Lexer](doc/component/Lexer.markdown)
- * Lexer options
- * Token and file positions for nodes
- * Custom attributes
+ * Emulation
+ * Tokens, positions and attributes
* [Error handling](doc/component/Error_handling.markdown)
* Column information for errors
* Error recovery (parsing of syntactically incorrect code)
@@ -223,3 +230,4 @@ Component documentation:
[doc_3_x]: https://github.com/nikic/PHP-Parser/tree/3.x/doc
[doc_4_x]: https://github.com/nikic/PHP-Parser/tree/4.x/doc
+ [doc_master]: https://github.com/nikic/PHP-Parser/tree/master/doc
diff --git a/Sources/vendor/nikic/php-parser/bin/php-parse b/Sources/vendor/nikic/php-parser/bin/php-parse
index bb3e46df..fc44f234 100755
--- a/Sources/vendor/nikic/php-parser/bin/php-parse
+++ b/Sources/vendor/nikic/php-parser/bin/php-parse
@@ -26,13 +26,7 @@ if (empty($files)) {
showHelp("Must specify at least one file.");
}
-$lexer = new PhpParser\Lexer\Emulative(['usedAttributes' => [
- 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments'
-]]);
-$parser = (new PhpParser\ParserFactory)->create(
- PhpParser\ParserFactory::PREFER_PHP7,
- $lexer
-);
+$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version']);
$dumper = new PhpParser\NodeDumper([
'dumpComments' => true,
'dumpPositions' => $attributes['with-positions'],
@@ -43,7 +37,10 @@ $traverser = new PhpParser\NodeTraverser();
$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver);
foreach ($files as $file) {
- if (strpos($file, ' Stdin:\n");
+ } else if (strpos($file, ' Code $code\n");
} else {
@@ -108,7 +105,7 @@ function showHelp($error = '') {
if ($error) {
fwrite(STDERR, $error . "\n\n");
}
- fwrite($error ? STDERR : STDOUT, <<