Skip to content

Commit 5f13c53

Browse files
authored
fix(php,php-nextgen): remove useless string cast from ObjectSerializer.mustache (#22121)
1 parent 1240d10 commit 5f13c53

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,6 @@ class ObjectSerializer
579579
}
580580
}
581581

582-
return $qs ? (string) substr($qs, 0, -1) : '';
582+
return $qs ? substr($qs, 0, -1) : '';
583583
}
584584
}

modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,6 @@ class ObjectSerializer
586586
}
587587
}
588588

589-
return $qs ? (string) substr($qs, 0, -1) : '';
589+
return $qs ? substr($qs, 0, -1) : '';
590590
}
591591
}

samples/client/echo_api/php-nextgen-streaming/src/ObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,6 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986):
588588
}
589589
}
590590

591-
return $qs ? (string) substr($qs, 0, -1) : '';
591+
return $qs ? substr($qs, 0, -1) : '';
592592
}
593593
}

samples/client/echo_api/php-nextgen/src/ObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,6 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986):
588588
}
589589
}
590590

591-
return $qs ? (string) substr($qs, 0, -1) : '';
591+
return $qs ? substr($qs, 0, -1) : '';
592592
}
593593
}

samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,6 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986):
587587
}
588588
}
589589

590-
return $qs ? (string) substr($qs, 0, -1) : '';
590+
return $qs ? substr($qs, 0, -1) : '';
591591
}
592592
}

samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,6 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986):
594594
}
595595
}
596596

597-
return $qs ? (string) substr($qs, 0, -1) : '';
597+
return $qs ? substr($qs, 0, -1) : '';
598598
}
599599
}

samples/client/petstore/php/psr-18/lib/ObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,6 @@ public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986):
594594
}
595595
}
596596

597-
return $qs ? (string) substr($qs, 0, -1) : '';
597+
return $qs ? substr($qs, 0, -1) : '';
598598
}
599599
}

0 commit comments

Comments
 (0)