Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SalmaGhareeb committed Dec 13, 2016
2 parents b0fb4e4 + 4f53228 commit 9eceddf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SalmaAbdelhady/RoomsXML/Operations/AvailabilitySearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function checkAvailability($payLoad)
$hotelDetails->setArrivalDate(new \DateTime($payLoad['arrivalDate']));
$hotelDetails->setNationality($payLoad['nationality']);
$hotelDetails->setNights($payLoad['nights']);

foreach ($payLoad['rooms'] as $room) {
$hotelRoom = new Room();
$guests = new Guests();
Expand All @@ -104,10 +105,9 @@ public function checkAvailability($payLoad)
}
for ($i = 0; $i < $room['child']; $i++) {
$ch = new Person();
$ch->setAge(12);
$ch->setAge($room['child_ages'][$i]);
$guests->addChild($ch);
}

$hotelRoom->setGuests($guests);
$hotelDetails->addRoom($hotelRoom);
}
Expand Down

0 comments on commit 9eceddf

Please sign in to comment.