From b88599c1f52b21134188eff3e39c5699de2faa43 Mon Sep 17 00:00:00 2001 From: Matthieu Guffroy <mattgu74@gmail.com> Date: Wed, 11 Jun 2014 22:39:27 +0200 Subject: [PATCH] Update class with good syntax --- class/animal.php | 21 +++++++++---------- class/client.php | 4 ++-- class/employe.php | 4 ++-- class/espece.php | 12 +++++------ class/facture.php | 5 ++--- class/{ligne_facture.php => ligneFacture.php} | 7 +++---- class/ordonnance.php | 5 ++--- class/personne.php | 3 +-- class/prestation.php | 5 ++--- class/race.php | 4 ++-- class/rdv.php | 4 ++-- class/veterinaire.php | 4 ++-- 12 files changed, 36 insertions(+), 42 deletions(-) rename class/{ligne_facture.php => ligneFacture.php} (89%) diff --git a/class/animal.php b/class/animal.php index f6e847e..bd7c1ff 100644 --- a/class/animal.php +++ b/class/animal.php @@ -1,4 +1,5 @@ <?php + class Animal { private $nom; @@ -10,7 +11,6 @@ class Animal private $taille; private $code; - public function nom() { return $this->nom; @@ -51,24 +51,24 @@ class Animal $this->sterile = $sterile; } - public function date_naissance() + public function dateNaissance() { - return $this->date_naissance; + return $this->dateNaissance; } - public function setDate_naissance($date_naissance) + public function setDateNaissance($dateNaissance) { - $this->date_naissance = $date_naissance; + $this->dateNaissance = $dateNaissance; } - public function date_deces() + public function dateDeces() { - return $this->date_deces; + return $this->dateDeces; } - public function setDate_deces($date_deces) + public function setDateDeces($dateDeces) { - $this->date_deces = $date_deces; + $this->dateDeces = $dateDeces; } public function taille() @@ -90,5 +90,4 @@ class Animal { $this->code = $code; } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/class/client.php b/class/client.php index 754dec7..482e91c 100644 --- a/class/client.php +++ b/class/client.php @@ -1,4 +1,5 @@ <?php + class Client extends Personne { private $numTel; @@ -12,5 +13,4 @@ class Client extends Personne { $this->numTel = $numTel; } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/class/employe.php b/class/employe.php index fd74988..c53f727 100644 --- a/class/employe.php +++ b/class/employe.php @@ -1,4 +1,5 @@ <?php + class Employe extends Personne { private $id; @@ -12,5 +13,4 @@ class Employe extends Personne { $this->id = $id; } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/class/espece.php b/class/espece.php index 7fe5f7b..9a02c89 100644 --- a/class/espece.php +++ b/class/espece.php @@ -1,4 +1,5 @@ <?php + class Espece { private $nom; @@ -14,14 +15,13 @@ class Espece $this->nom = $nom; } - public function prix_consult() + public function prixConsult() { - return $this->prix_consult; + return $this->prixConsult; } - public function setPrix_consult($prix_consult) + public function setPrixConsult($prixConsult) { - $this->prix_consult = $prix_consult; + $this->prixConsult = $prixConsult; } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/class/facture.php b/class/facture.php index 7db3638..9425179 100644 --- a/class/facture.php +++ b/class/facture.php @@ -1,4 +1,5 @@ <?php + class Facture { private $id; @@ -7,7 +8,6 @@ class Facture private $moyen_paiement; private $prix_total; - public function id() { return $this->id; @@ -57,5 +57,4 @@ class Facture { $this->prix_total = $prix_total; } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/class/ligne_facture.php b/class/ligneFacture.php similarity index 89% rename from class/ligne_facture.php rename to class/ligneFacture.php index a3f7b0a..9f2bc36 100644 --- a/class/ligne_facture.php +++ b/class/ligneFacture.php @@ -1,11 +1,11 @@ <?php -class Ligne_facture + +class LigneFacture { private $num; private $quantite; private $remise; - public function num() { return $this->num; @@ -34,5 +34,4 @@ class Ligne_facture public function setRemise($remise) { $this->remise = $remise; - } -?> \ No newline at end of file + } \ No newline at end of file diff --git a/class/ordonnance.php b/class/ordonnance.php index 6682738..c624ba0 100644 --- a/class/ordonnance.php +++ b/class/ordonnance.php @@ -1,11 +1,11 @@ <?php + class Ordonnance { private $id; private $date_edition; private $prix; - public function id() { return $this->id; @@ -35,5 +35,4 @@ class Ordonnance { $this->prix = $prix; } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/class/personne.php b/class/personne.php index 5cda681..2d3b877 100644 --- a/class/personne.php +++ b/class/personne.php @@ -1,4 +1,5 @@ <?php + class Personne { private $nom; @@ -24,8 +25,6 @@ class Personne $this->prenom = $prenom; } } -?> - diff --git a/class/prestation.php b/class/prestation.php index 36a0029..f0cc246 100644 --- a/class/prestation.php +++ b/class/prestation.php @@ -1,4 +1,5 @@ <?php + class Prestation { private $id; @@ -6,7 +7,6 @@ class Prestation private $type; private $prix; - public function id() { return $this->id; @@ -46,5 +46,4 @@ class Prestation { $this->prix = $prix; } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/class/race.php b/class/race.php index ffa338e..15e64c2 100644 --- a/class/race.php +++ b/class/race.php @@ -1,4 +1,5 @@ <?php + class Race { private $nom; @@ -23,5 +24,4 @@ class Race { $this->prix_intervention = $prix_intervention; } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/class/rdv.php b/class/rdv.php index bad5fc7..8fc6b44 100644 --- a/class/rdv.php +++ b/class/rdv.php @@ -1,4 +1,5 @@ <?php + class Rdv { private $id; @@ -35,5 +36,4 @@ class Rdv { $this->duree = $duree; } -} -?> \ No newline at end of file +} \ No newline at end of file diff --git a/class/veterinaire.php b/class/veterinaire.php index 85e6f02..a59c817 100644 --- a/class/veterinaire.php +++ b/class/veterinaire.php @@ -1,4 +1,5 @@ <?php + class Veterinaire extends Employe { private $idNational; @@ -12,5 +13,4 @@ class Veterinaire extends Employe { $this->idNational = $idNational; } -} -?> \ No newline at end of file +} \ No newline at end of file -- GitLab