@@ -28,19 +28,44 @@ pub fn integrate(module: &mut Module) {
2828 module. add_class ( make_arg_typehint_class ( ) ) ;
2929 module. add_class ( make_return_typehint_class ( ) ) ;
3030 module. add_class ( make_arg_default_value_class ( ) ) ;
31- module. add_function ( "integration_function_return_bool" , |_| -> Result < bool , Infallible > { Ok ( true ) } )
31+ module
32+ . add_function (
33+ "integration_function_return_bool" ,
34+ |_| -> Result < bool , Infallible > { Ok ( true ) } ,
35+ )
3236 . return_type ( ReturnType :: new ( ReturnTypeHint :: Bool ) ) ;
33- module. add_function ( "integration_function_return_int" , |_| -> Result < i64 , Infallible > { Ok ( 42 ) } )
37+ module
38+ . add_function (
39+ "integration_function_return_int" ,
40+ |_| -> Result < i64 , Infallible > { Ok ( 42 ) } ,
41+ )
3442 . return_type ( ReturnType :: new ( ReturnTypeHint :: Int ) ) ;
35- module. add_function ( "integration_function_return_float" , |_| -> Result < f64 , Infallible > { Ok ( 3.14 ) } )
43+ module
44+ . add_function (
45+ "integration_function_return_float" ,
46+ |_| -> Result < f64 , Infallible > { Ok ( 1.234 ) } ,
47+ )
3648 . return_type ( ReturnType :: new ( ReturnTypeHint :: Float ) ) ;
37- module. add_function ( "integration_function_return_string" , |_| -> Result < & ' static str , Infallible > { Ok ( "phper" ) } )
49+ module
50+ . add_function (
51+ "integration_function_return_string" ,
52+ |_| -> Result < & ' static str , Infallible > { Ok ( "phper" ) } ,
53+ )
3854 . return_type ( ReturnType :: new ( ReturnTypeHint :: String ) ) ;
39- module. add_function ( "integration_function_return_array" , |_| -> Result < ZArray , Infallible > { Ok ( ZArray :: new ( ) ) } )
55+ module
56+ . add_function (
57+ "integration_function_return_array" ,
58+ |_| -> Result < ZArray , Infallible > { Ok ( ZArray :: new ( ) ) } ,
59+ )
4060 . return_type ( ReturnType :: new ( ReturnTypeHint :: Array ) ) ;
41- module. add_function ( "integration_function_return_mixed" , |_| -> Result < ZVal , Infallible > { Ok ( ZVal :: from ( 1.23 ) ) } )
61+ module
62+ . add_function (
63+ "integration_function_return_mixed" ,
64+ |_| -> Result < ZVal , Infallible > { Ok ( ZVal :: from ( 1.23 ) ) } ,
65+ )
4266 . return_type ( ReturnType :: new ( ReturnTypeHint :: Mixed ) ) ;
43- module. add_function ( "integration_function_return_void" , |_| phper:: ok ( ( ) ) )
67+ module
68+ . add_function ( "integration_function_return_void" , |_| phper:: ok ( ( ) ) )
4469 . return_type ( ReturnType :: new ( ReturnTypeHint :: Void ) ) ;
4570 module
4671 . add_function ( "integration_function_typehints" , |_| phper:: ok ( ( ) ) )
@@ -471,11 +496,9 @@ fn make_return_typehint_class() -> ClassEntity<()> {
471496 . return_type ( ReturnType :: new ( ReturnTypeHint :: Null ) ) ;
472497
473498 class
474- . add_method (
475- "returnString" ,
476- Visibility :: Public ,
477- move |_, _| phper:: ok ( "phper" ) ,
478- )
499+ . add_method ( "returnString" , Visibility :: Public , move |_, _| {
500+ phper:: ok ( "phper" )
501+ } )
479502 . return_type ( ReturnType :: new ( ReturnTypeHint :: String ) ) ;
480503
481504 class
@@ -485,7 +508,9 @@ fn make_return_typehint_class() -> ClassEntity<()> {
485508 . return_type ( ReturnType :: new ( ReturnTypeHint :: String ) . allow_null ( ) ) ;
486509
487510 class
488- . add_method ( "returnBool" , Visibility :: Public , move |_, _| phper:: ok ( true ) )
511+ . add_method ( "returnBool" , Visibility :: Public , move |_, _| {
512+ phper:: ok ( true )
513+ } )
489514 . return_type ( ReturnType :: new ( ReturnTypeHint :: Bool ) ) ;
490515
491516 class
@@ -505,7 +530,9 @@ fn make_return_typehint_class() -> ClassEntity<()> {
505530 . return_type ( ReturnType :: new ( ReturnTypeHint :: Int ) . allow_null ( ) ) ;
506531
507532 class
508- . add_method ( "returnFloat" , Visibility :: Public , move |_, _| phper:: ok ( 3.14 ) )
533+ . add_method ( "returnFloat" , Visibility :: Public , move |_, _| {
534+ phper:: ok ( 1.234 )
535+ } )
509536 . return_type ( ReturnType :: new ( ReturnTypeHint :: Float ) ) ;
510537
511538 class
@@ -515,7 +542,9 @@ fn make_return_typehint_class() -> ClassEntity<()> {
515542 . return_type ( ReturnType :: new ( ReturnTypeHint :: Float ) . allow_null ( ) ) ;
516543
517544 class
518- . add_method ( "returnArray" , Visibility :: Public , move |_, _| phper:: ok ( ZArray :: new ( ) ) )
545+ . add_method ( "returnArray" , Visibility :: Public , move |_, _| {
546+ phper:: ok ( ZArray :: new ( ) )
547+ } )
519548 . return_type ( ReturnType :: new ( ReturnTypeHint :: Array ) ) ;
520549
521550 class
0 commit comments