@@ -521,17 +521,17 @@ public function getTopLogprobs(): ?int
521521 *
522522 * @since 0.1.0
523523 *
524- * @param list<FunctionDeclaration> $function_declarations The function declarations.
524+ * @param list<FunctionDeclaration> $functionDeclarations The function declarations.
525525 *
526526 * @throws InvalidArgumentException If the array is not a list.
527527 */
528- public function setFunctionDeclarations (array $ function_declarations ): void
528+ public function setFunctionDeclarations (array $ functionDeclarations ): void
529529 {
530- if (!array_is_list ($ function_declarations )) {
530+ if (!array_is_list ($ functionDeclarations )) {
531531 throw new InvalidArgumentException ('Function declarations must be a list array. ' );
532532 }
533533
534- $ this ->functionDeclarations = $ function_declarations ;
534+ $ this ->functionDeclarations = $ functionDeclarations ;
535535 }
536536
537537 /**
@@ -551,11 +551,11 @@ public function getFunctionDeclarations(): ?array
551551 *
552552 * @since 0.1.0
553553 *
554- * @param WebSearch $web_search The web search configuration.
554+ * @param WebSearch $webSearch The web search configuration.
555555 */
556- public function setWebSearch (WebSearch $ web_search ): void
556+ public function setWebSearch (WebSearch $ webSearch ): void
557557 {
558- $ this ->webSearch = $ web_search ;
558+ $ this ->webSearch = $ webSearch ;
559559 }
560560
561561 /**
@@ -729,12 +729,12 @@ protected function validateMediaOrientationAspectRatioCompatibility(
729729 MediaOrientationEnum $ orientation ,
730730 string $ aspectRatio
731731 ): void {
732- if ($ orientation ->isSquare () && $ aspectRatio !== '1:1 ' ) {
732+ $ aspectRatioParts = explode (': ' , $ aspectRatio );
733+ if ($ orientation ->isSquare () && $ aspectRatioParts [0 ] !== $ aspectRatioParts [1 ]) {
733734 throw new InvalidArgumentException (
734735 'The aspect ratio " ' . $ aspectRatio . '" is not compatible with the square orientation. '
735736 );
736737 }
737- $ aspectRatioParts = explode (': ' , $ aspectRatio );
738738 if ($ orientation ->isLandscape () && $ aspectRatioParts [0 ] <= $ aspectRatioParts [1 ]) {
739739 throw new InvalidArgumentException (
740740 'The aspect ratio " ' . $ aspectRatio . '" is not compatible with the landscape orientation. '
@@ -991,8 +991,8 @@ static function (ModalityEnum $modality): string {
991991
992992 if ($ this ->functionDeclarations !== null ) {
993993 $ data [self ::KEY_FUNCTION_DECLARATIONS ] = array_map (
994- static function (FunctionDeclaration $ function_declaration ): array {
995- return $ function_declaration ->toArray ();
994+ static function (FunctionDeclaration $ functionDeclaration ): array {
995+ return $ functionDeclaration ->toArray ();
996996 },
997997 $ this ->functionDeclarations
998998 );
@@ -1096,8 +1096,8 @@ public static function fromArray(array $array): self
10961096
10971097 if (isset ($ array [self ::KEY_FUNCTION_DECLARATIONS ])) {
10981098 $ config ->setFunctionDeclarations (array_map (
1099- static function (array $ function_declaration_data ): FunctionDeclaration {
1100- return FunctionDeclaration::fromArray ($ function_declaration_data );
1099+ static function (array $ functionDeclarationData ): FunctionDeclaration {
1100+ return FunctionDeclaration::fromArray ($ functionDeclarationData );
11011101 },
11021102 $ array [self ::KEY_FUNCTION_DECLARATIONS ]
11031103 ));
0 commit comments