Skip to content

Commit

Permalink
Bump php-cs-fixer to version 3.60 (#1743)
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse authored Jul 30, 2024
1 parent 67ff161 commit 689f42d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Changed

- Enable compiler optimization for the `sprintf` function.

## 1.0.3

### Changed
Expand Down
10 changes: 5 additions & 5 deletions src/Input/CalculateRouteMatrixRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->calculatorName) {
throw new InvalidArgument(sprintf('Missing parameter "CalculatorName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "CalculatorName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['CalculatorName'] = $v;
$uriString = '/routes/v0/calculators/' . rawurlencode($uri['CalculatorName']) . '/calculate/route-matrix';
Expand Down Expand Up @@ -389,7 +389,7 @@ private function requestBody(): array
$payload = [];

if (null === $v = $this->departurePositions) {
throw new InvalidArgument(sprintf('Missing parameter "DeparturePositions" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "DeparturePositions" for "%s". The value cannot be null.', __CLASS__));
}

$index = -1;
Expand All @@ -406,7 +406,7 @@ private function requestBody(): array
}

if (null === $v = $this->destinationPositions) {
throw new InvalidArgument(sprintf('Missing parameter "DestinationPositions" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "DestinationPositions" for "%s". The value cannot be null.', __CLASS__));
}

$index = -1;
Expand All @@ -424,7 +424,7 @@ private function requestBody(): array

if (null !== $v = $this->travelMode) {
if (!TravelMode::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "TravelMode" for "%s". The value "%s" is not a valid "TravelMode".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "TravelMode" for "%s". The value "%s" is not a valid "TravelMode".', __CLASS__, $v));
}
$payload['TravelMode'] = $v;
}
Expand All @@ -436,7 +436,7 @@ private function requestBody(): array
}
if (null !== $v = $this->distanceUnit) {
if (!DistanceUnit::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "DistanceUnit" for "%s". The value "%s" is not a valid "DistanceUnit".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "DistanceUnit" for "%s". The value "%s" is not a valid "DistanceUnit".', __CLASS__, $v));
}
$payload['DistanceUnit'] = $v;
}
Expand Down
12 changes: 6 additions & 6 deletions src/Input/CalculateRouteRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->calculatorName) {
throw new InvalidArgument(sprintf('Missing parameter "CalculatorName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "CalculatorName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['CalculatorName'] = $v;
$uriString = '/routes/v0/calculators/' . rawurlencode($uri['CalculatorName']) . '/calculate/route';
Expand Down Expand Up @@ -502,7 +502,7 @@ private function requestBody(): array
$payload = [];

if (null === $v = $this->departurePosition) {
throw new InvalidArgument(sprintf('Missing parameter "DeparturePosition" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "DeparturePosition" for "%s". The value cannot be null.', __CLASS__));
}

$index = -1;
Expand All @@ -513,7 +513,7 @@ private function requestBody(): array
}

if (null === $v = $this->destinationPosition) {
throw new InvalidArgument(sprintf('Missing parameter "DestinationPosition" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "DestinationPosition" for "%s". The value cannot be null.', __CLASS__));
}

$index = -1;
Expand All @@ -539,7 +539,7 @@ private function requestBody(): array
}
if (null !== $v = $this->travelMode) {
if (!TravelMode::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "TravelMode" for "%s". The value "%s" is not a valid "TravelMode".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "TravelMode" for "%s". The value "%s" is not a valid "TravelMode".', __CLASS__, $v));
}
$payload['TravelMode'] = $v;
}
Expand All @@ -551,7 +551,7 @@ private function requestBody(): array
}
if (null !== $v = $this->distanceUnit) {
if (!DistanceUnit::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "DistanceUnit" for "%s". The value "%s" is not a valid "DistanceUnit".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "DistanceUnit" for "%s". The value "%s" is not a valid "DistanceUnit".', __CLASS__, $v));
}
$payload['DistanceUnit'] = $v;
}
Expand All @@ -569,7 +569,7 @@ private function requestBody(): array
}
if (null !== $v = $this->optimizeFor) {
if (!OptimizationMode::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "OptimizeFor" for "%s". The value "%s" is not a valid "OptimizationMode".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "OptimizeFor" for "%s". The value "%s" is not a valid "OptimizationMode".', __CLASS__, $v));
}
$payload['OptimizeFor'] = $v;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Input/SearchPlaceIndexForPositionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->indexName) {
throw new InvalidArgument(sprintf('Missing parameter "IndexName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "IndexName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['IndexName'] = $v;
$uriString = '/places/v0/indexes/' . rawurlencode($uri['IndexName']) . '/search/position';
Expand Down Expand Up @@ -211,7 +211,7 @@ private function requestBody(): array
$payload = [];

if (null === $v = $this->position) {
throw new InvalidArgument(sprintf('Missing parameter "Position" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Position" for "%s". The value cannot be null.', __CLASS__));
}

$index = -1;
Expand Down
4 changes: 2 additions & 2 deletions src/Input/SearchPlaceIndexForTextRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function request(): Request
// Prepare URI
$uri = [];
if (null === $v = $this->indexName) {
throw new InvalidArgument(sprintf('Missing parameter "IndexName" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "IndexName" for "%s". The value cannot be null.', __CLASS__));
}
$uri['IndexName'] = $v;
$uriString = '/places/v0/indexes/' . rawurlencode($uri['IndexName']) . '/search/text';
Expand Down Expand Up @@ -343,7 +343,7 @@ private function requestBody(): array
$payload = [];

if (null === $v = $this->text) {
throw new InvalidArgument(sprintf('Missing parameter "Text" for "%s". The value cannot be null.', __CLASS__));
throw new InvalidArgument(\sprintf('Missing parameter "Text" for "%s". The value cannot be null.', __CLASS__));
}
$payload['Text'] = $v;
if (null !== $v = $this->biasPosition) {
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObject/TruckDimensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function requestBody(): array
}
if (null !== $v = $this->unit) {
if (!DimensionUnit::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "Unit" for "%s". The value "%s" is not a valid "DimensionUnit".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "Unit" for "%s". The value "%s" is not a valid "DimensionUnit".', __CLASS__, $v));
}
$payload['Unit'] = $v;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObject/TruckWeight.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function requestBody(): array
}
if (null !== $v = $this->unit) {
if (!VehicleWeightUnit::exists($v)) {
throw new InvalidArgument(sprintf('Invalid parameter "Unit" for "%s". The value "%s" is not a valid "VehicleWeightUnit".', __CLASS__, $v));
throw new InvalidArgument(\sprintf('Invalid parameter "Unit" for "%s". The value "%s" is not a valid "VehicleWeightUnit".', __CLASS__, $v));
}
$payload['Unit'] = $v;
}
Expand Down

0 comments on commit 689f42d

Please sign in to comment.