From b0fb4e41cf4037d6d99d10e537ba193e56c30539 Mon Sep 17 00:00:00 2001 From: Salma Abdelhady Date: Tue, 13 Dec 2016 16:05:37 +0200 Subject: [PATCH] Little fixes And update dependencies --- composer.json | 2 +- composer.lock | 102 +++++++++--------- src/SalmaAbdelhady/RoomsXML/Model/Booking.php | 21 ++-- .../RoomsXML/Model/HotelStayDetails.php | 52 ++++++--- .../RoomsXML/RoomsXMLException.php | 6 +- .../RoomsXML/RoomsXMLRequest.php | 2 +- 6 files changed, 110 insertions(+), 75 deletions(-) diff --git a/composer.json b/composer.json index 46529b2..1753869 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "php": ">=5.4.0", "kriswallsmith/buzz": "^0.15.0", "ext-curl": "*", - "jms/serializer": "1.1.0", + "jms/serializer": "1.0.0", "doctrine/collections": "^1.3" }, diff --git a/composer.lock b/composer.lock index fd9c0d5..b8d28bd 100644 --- a/composer.lock +++ b/composer.lock @@ -4,40 +4,40 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "e66be41517171e0d7ad882040217daaa", - "content-hash": "2e8dddcc96f1f65c76dc8e7054b91ede", + "hash": "836a6814ed3a86096d0bda4c561a5e86", + "content-hash": "129e8cd1427b4c9746296850480edde9", "packages": [ { "name": "doctrine/annotations", - "version": "v1.2.7", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/30e07cf03edc3cd3ef579d0dd4dd8c58250799a5", + "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5", "shasum": "" }, "require": { "doctrine/lexer": "1.*", - "php": ">=5.3.2" + "php": "^5.6 || ^7.0" }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "^5.6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" } }, "notification-url": "https://packagist.org/downloads/", @@ -73,7 +73,7 @@ "docblock", "parser" ], - "time": "2015-08-31 12:32:49" + "time": "2016-10-24 11:45:47" }, { "name": "doctrine/collections", @@ -251,23 +251,24 @@ }, { "name": "jms/metadata", - "version": "1.5.1", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/metadata.git", - "reference": "22b72455559a25777cfd28c4ffda81ff7639f353" + "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/22b72455559a25777cfd28c4ffda81ff7639f353", - "reference": "22b72455559a25777cfd28c4ffda81ff7639f353", + "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6a06970a10e0a532fb52d3959547123b84a3b3ab", + "reference": "6a06970a10e0a532fb52d3959547123b84a3b3ab", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "doctrine/cache": "~1.0" + "doctrine/cache": "~1.0", + "symfony/cache": "~3.1" }, "type": "library", "extra": { @@ -282,14 +283,12 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache" + "Apache-2.0" ], "authors": [ { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" } ], "description": "Class/method/property metadata management in PHP", @@ -299,7 +298,7 @@ "xml", "yaml" ], - "time": "2014-07-12 07:13:19" + "time": "2016-12-05 10:18:33" }, { "name": "jms/parser-lib", @@ -338,16 +337,16 @@ }, { "name": "jms/serializer", - "version": "1.1.0", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48" + "reference": "a29d9a204efc3ca3f39a9d182a83fd34462fef3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/fe13a1f993ea3456e195b7820692f2eb2b6bbb48", - "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/a29d9a204efc3ca3f39a9d182a83fd34462fef3f", + "reference": "a29d9a204efc3ca3f39a9d182a83fd34462fef3f", "shasum": "" }, "require": { @@ -358,9 +357,6 @@ "php": ">=5.4.0", "phpcollection/phpcollection": "~0.1" }, - "conflict": { - "twig/twig": "<1.12" - }, "require-dev": { "doctrine/orm": "~2.1", "doctrine/phpcr-odm": "~1.0.1", @@ -372,7 +368,7 @@ "symfony/translation": "~2.0", "symfony/validator": "~2.0", "symfony/yaml": "2.*", - "twig/twig": "~1.12|~2.0" + "twig/twig": ">=1.8,<2.0-dev" }, "suggest": { "symfony/yaml": "Required if you'd like to serialize data to YAML format." @@ -380,7 +376,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "0.17-dev" } }, "autoload": { @@ -407,7 +403,7 @@ "serialization", "xml" ], - "time": "2015-10-27 09:24:41" + "time": "2015-06-16 11:50:24" }, { "name": "kriswallsmith/buzz", @@ -459,16 +455,16 @@ }, { "name": "phpcollection/phpcollection", - "version": "0.4.0", + "version": "0.5.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-collection.git", - "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83" + "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/b8bf55a0a929ca43b01232b36719f176f86c7e83", - "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83", + "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", + "reference": "f2bcff45c0da7c27991bbc1f90f47c4b7fb434a6", "shasum": "" }, "require": { @@ -477,7 +473,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.3-dev" + "dev-master": "0.4-dev" } }, "autoload": { @@ -491,10 +487,8 @@ ], "authors": [ { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" } ], "description": "General-Purpose Collection Library for PHP", @@ -505,7 +499,7 @@ "sequence", "set" ], - "time": "2014-03-11 13:46:42" + "time": "2015-05-17 12:39:23" }, { "name": "phpoption/phpoption", @@ -561,16 +555,16 @@ "packages-dev": [ { "name": "symfony/polyfill-mbstring", - "version": "v1.1.1", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "1289d16209491b584839022f29257ad859b8532d" + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d", - "reference": "1289d16209491b584839022f29257ad859b8532d", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", "shasum": "" }, "require": { @@ -582,7 +576,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -616,20 +610,20 @@ "portable", "shim" ], - "time": "2016-01-20 09:13:37" + "time": "2016-11-14 01:06:16" }, { "name": "symfony/var-dumper", - "version": "v2.8.4", + "version": "v2.8.15", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "1f840df081f59cbe25140742bbe94a0dfac0222a" + "reference": "873e692cdc3ed80ab3c1d6404b087ce396dd4acc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1f840df081f59cbe25140742bbe94a0dfac0222a", - "reference": "1f840df081f59cbe25140742bbe94a0dfac0222a", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/873e692cdc3ed80ab3c1d6404b087ce396dd4acc", + "reference": "873e692cdc3ed80ab3c1d6404b087ce396dd4acc", "shasum": "" }, "require": { @@ -679,7 +673,7 @@ "debug", "dump" ], - "time": "2016-03-07 14:04:32" + "time": "2016-12-06 16:05:07" } ], "aliases": [], diff --git a/src/SalmaAbdelhady/RoomsXML/Model/Booking.php b/src/SalmaAbdelhady/RoomsXML/Model/Booking.php index 68ba771..ac12db6 100644 --- a/src/SalmaAbdelhady/RoomsXML/Model/Booking.php +++ b/src/SalmaAbdelhady/RoomsXML/Model/Booking.php @@ -23,14 +23,14 @@ class Booking { /** - * @var + * @var booking creation date * @Type(name="DateTime<'Y-m-d'>") * @SerializedName("CreationDate") */ protected $CreationDate; /** - * @var + * @var hotel booking details * @SerializedName("HotelBooking") * @XmlList(inline=true,entry="HotelBooking") * @XmlElement(cdata=false) @@ -40,7 +40,9 @@ class Booking protected $HotelBooking; /** - * @return mixed + * get booking creating date + * + * @return \DateTime */ public function getCreationDate() { @@ -48,7 +50,9 @@ public function getCreationDate() } /** - * @param mixed $CreationDate + * set booking creation date + * + * @param $CreationDate */ public function setCreationDate($CreationDate) { @@ -56,7 +60,10 @@ public function setCreationDate($CreationDate) } /** - * @return mixed + * Get hotel booking object + * + * + * @return HotelBooking */ public function getHotelBooking() { @@ -64,7 +71,9 @@ public function getHotelBooking() } /** - * @param mixed $HotelBooking + * HotelBooking setter + * + * @param HotelBooking $HotelBooking */ public function setHotelBooking($HotelBooking) { diff --git a/src/SalmaAbdelhady/RoomsXML/Model/HotelStayDetails.php b/src/SalmaAbdelhady/RoomsXML/Model/HotelStayDetails.php index 2cf9245..955d07e 100644 --- a/src/SalmaAbdelhady/RoomsXML/Model/HotelStayDetails.php +++ b/src/SalmaAbdelhady/RoomsXML/Model/HotelStayDetails.php @@ -1,4 +1,11 @@ ") @@ -27,12 +32,15 @@ class HotelStayDetails private $ArrivalDate; /** + * @var hotel stay details nights tag * @XmlElement(cdata=false) * @Type(name="integer") * @SerializedName("Nights") */ private $Nights; + /** + * @var Nationality tag * @XmlElement(cdata=false) * @Type(name="string") * @SerializedName("Nationality") @@ -41,6 +49,7 @@ class HotelStayDetails private $Nationality; /** + * @var Rooms tag * @XmlElement(cdata=false) * @Type(name="array") * @XmlList(inline = true, entry = "Room") @@ -57,7 +66,9 @@ public function __construct() } /** - * @return mixed + * get Arrival date + * + * @return \DateTime<'Y-m-d'> */ public function getArrivalDate() { @@ -65,7 +76,9 @@ public function getArrivalDate() } /** - * @param mixed $ArrivalDate + * Set Arrival date + * + * @param DateTime<'Y-m-d'> $ArrivalDate */ public function setArrivalDate($ArrivalDate) { @@ -73,7 +86,9 @@ public function setArrivalDate($ArrivalDate) } /** - * @return mixed + * Return nights + * + * @return integer */ public function getNights() { @@ -81,7 +96,9 @@ public function getNights() } /** - * @param mixed $Nights + * Set nights + * + * @param integer $Nights */ public function setNights($Nights) { @@ -89,7 +106,9 @@ public function setNights($Nights) } /** - * @return mixed + * Return customer nationality + * + * @return string */ public function getNationality() { @@ -97,7 +116,9 @@ public function getNationality() } /** - * @param mixed $Nationality + * Set customer nationality + * + * @param string $Nationality */ public function setNationality($Nationality) { @@ -105,7 +126,9 @@ public function setNationality($Nationality) } /** - * @return mixed + * Return hotel details rooms + * + * @return ArrayCollection */ public function getRooms() { @@ -113,7 +136,10 @@ public function getRooms() } /** - * @param mixed $Rooms + * + * Set Rooms tag + * + * @param ArrayCollection $Rooms */ public function setRooms($Rooms) { @@ -121,6 +147,8 @@ public function setRooms($Rooms) } /** + * Add room to Rooms tag + * * @param Room $room */ public function addRoom(Room $room) diff --git a/src/SalmaAbdelhady/RoomsXML/RoomsXMLException.php b/src/SalmaAbdelhady/RoomsXML/RoomsXMLException.php index 2e4f15f..6103936 100644 --- a/src/SalmaAbdelhady/RoomsXML/RoomsXMLException.php +++ b/src/SalmaAbdelhady/RoomsXML/RoomsXMLException.php @@ -17,7 +17,11 @@ */ class RoomsXMLException extends \Exception { - + /** + * RoomsXMLException constructor. + * @param null $message + * @param null $code + */ public function __construct($message = null, $code = null) { parent::__construct($message, $code); diff --git a/src/SalmaAbdelhady/RoomsXML/RoomsXMLRequest.php b/src/SalmaAbdelhady/RoomsXML/RoomsXMLRequest.php index 86d12e2..8f48980 100644 --- a/src/SalmaAbdelhady/RoomsXML/RoomsXMLRequest.php +++ b/src/SalmaAbdelhady/RoomsXML/RoomsXMLRequest.php @@ -37,7 +37,7 @@ class RoomsXMLRequest * @Type(name="SalmaAbdelhady\RoomsXML\Model\HotelStayDetails") * @SerializedName("HotelStayDetails") */ - public $hotelStayDetails; + public $HotelStayDetails; /** * @XmlElement(cdata=false)