@@ -541,25 +541,25 @@ final protected function validateAttributeValue<T>(
541541 }
542542 switch ($decl -> getValueType()) {
543543 case XHPAttributeType :: TYPE_STRING :
544- if (! is_string ($val )) {
544+ if (! ($val is string )) {
545545 $val = XHPAttributeCoercion :: CoerceToString($this , $attr , $val );
546546 }
547547 break ;
548548
549549 case XHPAttributeType :: TYPE_BOOL :
550- if (! is_bool ($val )) {
550+ if (! ($val is bool )) {
551551 $val = XHPAttributeCoercion :: CoerceToBool($this , $attr , $val );
552552 }
553553 break ;
554554
555555 case XHPAttributeType :: TYPE_INTEGER :
556- if (! is_int ($val )) {
556+ if (! ($val is int )) {
557557 $val = XHPAttributeCoercion :: CoerceToInt($this , $attr , $val );
558558 }
559559 break ;
560560
561561 case XHPAttributeType :: TYPE_FLOAT :
562- if (! is_float ($val )) {
562+ if (! ($val is float )) {
563563 $val = XHPAttributeCoercion :: CoerceToFloat($this , $attr , $val );
564564 }
565565 break ;
@@ -580,12 +580,12 @@ final protected function validateAttributeValue<T>(
580580 }
581581 // Things that are a valid array key without any coercion
582582 if ($class === ' HH\arraykey' ) {
583- if (is_int ($val ) || is_string ($val )) {
583+ if (($val is int ) || ($val is string )) {
584584 break ;
585585 }
586586 }
587587 if ($class === ' HH\num' ) {
588- if (is_int ($val ) || is_float ($val )) {
588+ if (($val is int ) || ($val is float )) {
589589 break ;
590590 }
591591 }
@@ -610,7 +610,7 @@ final protected function validateAttributeValue<T>(
610610 break ;
611611
612612 case XHPAttributeType :: TYPE_ENUM :
613- if (! (is_string ($val ) && $decl -> getEnumValues()-> contains($val ))) {
613+ if (! (($val is string ) && $decl -> getEnumValues()-> contains($val ))) {
614614 $enums = ' enum("' . implode (' ","' , $decl -> getEnumValues()). ' ")' ;
615615 throw new XHPInvalidAttributeException ($this , $enums , $attr , $val );
616616 }
@@ -780,7 +780,7 @@ final private function validateChildrenRule(
780780 * __getChildrenDescription.
781781 */
782782 public function __getChildrenDeclaration (): string {
783- return ( string ) self :: __xhpReflectionChildrenDeclaration();
783+ return self :: __xhpReflectionChildrenDeclaration() -> __toString ();
784784 }
785785
786786 /**
0 commit comments