Skip to content

Commit

Permalink
Merge pull request #40 from DaniilD/fix_strict_types
Browse files Browse the repository at this point in the history
Убрал declare(strict_types=1); из класса EditServiceAvailableMeals.php
  • Loading branch information
DmitryNaum authored Oct 25, 2021
2 parents fa826b3 + 1c1057e commit afa9115
Show file tree
Hide file tree
Showing 6 changed files with 580 additions and 590 deletions.
1,116 changes: 553 additions & 563 deletions README.md

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions src/HotelsConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use Bronevik\HotelsConnector\Element as Element;
use Bronevik\HotelsConnector\Enum\ClassMaps;
use Bronevik\HotelsConnector\Enum\Currencies;
use Bronevik\HotelsConnector\Enum\CurrencyCodes;
use Bronevik\HotelsConnector\Enum\Endpoints;
use Bronevik\HotelsConnector\Enum\Operations;
use SoapClient;
Expand Down Expand Up @@ -80,8 +78,7 @@ public function __construct(
$endpoint,
$secureEndpoint,
$debugMode = false
)
{
) {
$this->endpoint = $endpoint;
$this->secureEndpoint = $secureEndpoint;
$this->debugMode = (bool) $debugMode;
Expand Down Expand Up @@ -333,8 +330,7 @@ public function searchHotelOffers(
$hotelIds = [],
$skipElements = [],
$geolocation = null
)
{
) {
$request = new Element\SearchHotelOffersRequest();
$this->fillRequest($request);

Expand Down Expand Up @@ -708,8 +704,7 @@ public function searchHotelAvailability(
Element\GeoLocation $geolocation = null,
array $addElements = [],
array $searchCriteria = []
)
{
) {
$request = new Element\SearchHotelAvailabilityRequest();
$this->fillRequest($request);

Expand Down Expand Up @@ -766,8 +761,7 @@ public function getServiceAvailableCorrections(
public function getServicePricing(
$serviceId,
Element\UpdateService $updateService
)
{
) {
$request = new Element\GetServicePricingRequest();
$this->fillRequest($request);

Expand Down
3 changes: 1 addition & 2 deletions src/HotelsConnector/Element/EditServiceAvailableMeals.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php declare(strict_types=1);
<?php


namespace Bronevik\HotelsConnector\Element;


class EditServiceAvailableMeals extends AvailableMeals
{
/**
Expand Down
16 changes: 16 additions & 0 deletions src/HotelsConnector/Element/HotelInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,20 @@ public function getDeepLink()
{
return $this->deepLink;
}

/**
* @return string
*/
public function getPaymentTerms()
{
return $this->paymentTerms;
}

/**
* @param string $paymentTerms
*/
public function setPaymentTerms($paymentTerms)
{
$this->paymentTerms = $paymentTerms;
}
}
8 changes: 0 additions & 8 deletions src/HotelsConnector/Enum/Currencies.php

This file was deleted.

13 changes: 6 additions & 7 deletions tests/HotelsConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
use Bronevik\HotelsConnector\Element\UpdateService;
use Bronevik\HotelsConnector\Element\UpdateServiceRequest;
use Bronevik\HotelsConnector\Element\UpdateServiceResponse;
use Bronevik\HotelsConnector\Enum\Currencies;
use Bronevik\HotelsConnector\Enum\CurrencyCodes;
use Bronevik\HotelsConnector\Enum\Operations;
use Bronevik\Tests\Mock\HotelsConnectorMock;
Expand Down Expand Up @@ -194,7 +193,7 @@ public function testSearchHotelOffers_byGeolocation()
$hotels = new Hotels();

$request = new SearchHotelOffersRequest();
$request->currency = Currencies::RUSSIAN_RUBLE;
$request->currency = CurrencyCodes::RUB;
$request->arrivalDate = $arrivalDate;
$request->departureDate = $departureDate;
$request->skipElements = new SkipElements();
Expand Down Expand Up @@ -238,7 +237,7 @@ public function testSearchHotelOffers_byHotelIds()
$hotels = new Hotels();

$request = new SearchHotelOffersRequest();
$request->currency = Currencies::RUSSIAN_RUBLE;
$request->currency = CurrencyCodes::RUB;
$request->arrivalDate = $arrivalDate;
$request->departureDate = $departureDate;
$request->searchCriteria = $searchCriteria;
Expand Down Expand Up @@ -277,7 +276,7 @@ public function testSearchHotelOffers_byCityId()
$hotels = new Hotels();

$request = new SearchHotelOffersRequest();
$request->currency = Currencies::RUSSIAN_RUBLE;
$request->currency = CurrencyCodes::RUB;
$request->arrivalDate = $arrivalDate;
$request->departureDate = $departureDate;
$request->cityId = $cityId;
Expand Down Expand Up @@ -335,7 +334,7 @@ public function testSearchHotelAvailability_byCityId()
$hotels = [new HotelWithCheapestOffer()];

$request = new SearchHotelAvailabilityRequest();
$request->currency = Currencies::RUSSIAN_RUBLE;
$request->currency = CurrencyCodes::RUB;
$request->checkInDate = $checkinDate;
$request->checkOutDate = $checkOutDate;
$request->cityId = $cityId;
Expand Down Expand Up @@ -374,7 +373,7 @@ public function testSearchHotelAvailability_byHotelIds()
$hotels = [new HotelWithCheapestOffer()];

$request = new SearchHotelAvailabilityRequest();
$request->currency = Currencies::RUSSIAN_RUBLE;
$request->currency = CurrencyCodes::RUB;
$request->checkInDate = $checkinDate;
$request->checkOutDate = $checkOutDate;
$request->addElements = [];
Expand Down Expand Up @@ -415,7 +414,7 @@ public function testSearchHotelAvailability_byGeolocation()
$hotels = [new HotelWithCheapestOffer()];

$request = new SearchHotelAvailabilityRequest();
$request->currency = Currencies::RUSSIAN_RUBLE;
$request->currency = CurrencyCodes::RUB;
$request->checkInDate = $checkinDate;
$request->checkOutDate = $checkOutDate;
$request->addElements = [];
Expand Down

0 comments on commit afa9115

Please sign in to comment.