Skip to content

Commit ccdc36d

Browse files
committed
cs fixes
1 parent d5ec7ac commit ccdc36d

8 files changed

Lines changed: 15 additions & 24 deletions

src/SDK/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public function __call(string $name, array $arguments)
8686
private function getEndpoint(string $name, array $arguments) : EndpointInterface
8787
{
8888
$namespace = '\\TK\\SDK\\Endpoint';
89-
$endpointClass = $namespace . '\\'. \ucfirst($name);
90-
if (!\in_array($name, self::$validEndpoints, true) || ! class_exists($endpointClass)) {
89+
$endpointClass = $namespace . '\\' . \ucfirst($name);
90+
if (!\in_array($name, self::$validEndpoints, true) || !class_exists($endpointClass)) {
9191
$message = sprintf('%s (%s) is not valid TK API endpoint.', $name, $endpointClass);
9292
throw new BadMethodCallException($message);
9393
}

src/SDK/ValueObject/CalculateAwardMilesWithTaxParameters.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,9 @@ class CalculateAwardMilesWithTaxParameters implements ValueObjectInterface
1919
private $isOneWay = 'F';
2020
private $departureOrigin;
2121
private $departureDestination;
22-
/**
23-
* @var $departureDate DateTimeImmutable
24-
*/
2522
private $departureDate;
2623
private $arrivalOrigin;
2724
private $arrivalDestination;
28-
/**
29-
* @var $arrivalDate DateTimeImmutable
30-
*/
3125
private $arrivalDate;
3226
private $ptcType;
3327

@@ -37,7 +31,7 @@ public function __construct(string $awardType)
3731
throw new InvalidArgumentException(
3832
'Invalid awardType value. Possible values are "' .
3933
implode(', ', self::$awardTypeEnum) . '"' .
40-
' but provided value is "'. $awardType .'"'
34+
' but provided value is "' . $awardType .'"'
4135
);
4236
}
4337
$this->awardType = $awardType;

src/SDK/ValueObject/CalculateFlightMilesParameters.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ class CalculateFlightMilesParameters implements ValueObjectInterface
1616
private $classCode;
1717
private $marketingClassCode;
1818
private $cardType;
19-
/**
20-
* @var $flightDate DateTimeImmutable
21-
*/
2219
private $flightDate;
2320
private $operatingFlightNumber;
2421
private $marketingFlightNumber;
@@ -31,7 +28,7 @@ public function __construct(string $origin, string $destination)
3128

3229
private function getIataCode(string $iataCode) : string
3330
{
34-
if (! preg_match('/[A-Z]{3}/', $iataCode)) {
31+
if (!preg_match('/[A-Z]{3}/', $iataCode)) {
3532
{
3633
throw new InvalidArgumentException(
3734
sprintf(
@@ -64,7 +61,7 @@ public function withMarketingClassCode(string $marketingClassCode) : CalculateFl
6461

6562
public function withCardType(string $cardType) : CalculateFlightMilesParameters
6663
{
67-
if (! \in_array($cardType, self::$cardTypesEnum, true)) {
64+
if (!\in_array($cardType, self::$cardTypesEnum, true)) {
6865
throw new InvalidArgumentException(
6966
'Invalid card_type value provided. Possile values are: ' .
7067
implode(', ', self::$cardTypesEnum)

src/SDK/ValueObject/Factory/GetTimetableParametersFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function createFromArray(array $parameters) : GetTimetableParamete
4747
$parameters['OTA_AirScheduleRQ']['FlightTypePref']['DirectAndNonStopOnlyInd'] === true) {
4848
$airScheduleRQ = $airScheduleRQ->withDirectAndNonStopOnlyInd();
4949
}
50-
$getTimetableParameters = new GetTimetableParameters(
50+
$getTimetableParameters = new GetTimetableParameters(
5151
$airScheduleRQ,
5252
$parameters['scheduleType'],
5353
$parameters['tripType']

src/SDK/ValueObject/GetAvailabilityParameters.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ final class GetAvailabilityParameters implements ValueObjectInterface
99
{
1010
public const ROUTING_TYPE_ROUND_TRIP = 'r';
1111
public const ROUTING_TYPE_ONE_WAY = 'o';
12-
public const REDUCED_DATA_INDICATOR_TRUE = true;
13-
public const REDUCED_DATA_INDICATOR_FALSE = false;
12+
public const REDUCED_DATA_INDICATOR_TRUE = true;
13+
public const REDUCED_DATA_INDICATOR_FALSE = false;
1414

1515
private static $routingTypeEnum = ['o', 'r'];
1616

@@ -31,11 +31,11 @@ public function __construct(
3131

3232
private function setRoutingType(string $routingType) : void
3333
{
34-
if (! \in_array($routingType, self::$routingTypeEnum, true)) {
34+
if (!\in_array($routingType, self::$routingTypeEnum, true)) {
3535
throw new InvalidArgumentException(
3636
'Invalid Trip Type. Possible values are "' .
3737
implode(', ', self::$routingTypeEnum) . '"' .
38-
' but provided value is "'. $routingType .'"'
38+
' but provided value is "' . $routingType .'"'
3939
);
4040
}
4141
$this->queryParameters['RoutingType'] = $routingType;

src/SDK/ValueObject/GetFareFamilyListParameters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function withAirportIataCode(string $portIataCode) : GetFareFamilyListPar
2424

2525
private function checkPortIataCode(string $portIataCode) : void
2626
{
27-
if (! preg_match('/[A-Z]{3}/', $portIataCode)) {
27+
if (!preg_match('/[A-Z]{3}/', $portIataCode)) {
2828
{
2929
throw new InvalidArgumentException(
3030
'Invalid portList value provided. Valid IATA code must be used.'

src/SDK/ValueObject/Location.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function __construct(string $locationCode, bool $multiAirportCityInd)
2121

2222
private function setLocationCode(string $locationCode) : void
2323
{
24-
if (! preg_match('/[A-Z]{3}/', $locationCode)) {
24+
if (!preg_match('/[A-Z]{3}/', $locationCode)) {
2525
{
2626
throw new InvalidArgumentException(
2727
'Invalid OriginLocation.LocationCode value provided. Valid IATA code must be used'

src/SDK/ValueObject/OriginDestinationInformation.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function withCabinPreferences(string $cabinPreference) : OriginDestinatio
3535
implode(', ', self::$cabinPreferencesEnum)
3636
);
3737
}
38-
$this->cabinPreferences[]=$cabinPreference;
38+
$this->cabinPreferences[] = $cabinPreference;
3939
return $this;
4040
}
4141

@@ -47,9 +47,9 @@ public function getValue() : array
4747
'DestinationLocation' => $this->destinationLocation->getValue()
4848
];
4949
if (\count($this->cabinPreferences) !== 0) {
50-
$originDestinationInformationValue['CabinPreferences'] = [];
50+
$originDestinationInformationValue['CabinPreferences'] = [];
5151
foreach ($this->cabinPreferences as $cabinPreference) {
52-
$originDestinationInformationValue['CabinPreferences'][]= ['Cabin' => $cabinPreference];
52+
$originDestinationInformationValue['CabinPreferences'][] = ['Cabin' => $cabinPreference];
5353
}
5454
}
5555
return $originDestinationInformationValue;

0 commit comments

Comments
 (0)