@@ -109,7 +109,7 @@ |
||
109 | 109 | $offset = array_shift($offsets); |
110 | 110 | if (is_array($array[$offset])) { |
111 | 111 | /** @var NodeType[] $next_array */ |
112 | - $next_array =& $array[$offset]; |
|
112 | + $next_array = & $array[$offset]; |
|
113 | 113 | return $this->getRecursive($next_array, $offsets); |
114 | 114 | } else { |
115 | 115 | return $null; |
@@ -63,30 +63,30 @@ discard block |
||
63 | 63 | }; |
64 | 64 | $outout_converters[] = |
65 | 65 | /** |
66 | - * @template T |
|
67 | - * @param T $value |
|
68 | - * @param \FFI\CDataArray $toCData |
|
69 | - * @return T |
|
70 | - */ |
|
66 | + * @template T |
|
67 | + * @param T $value |
|
68 | + * @param \FFI\CDataArray $toCData |
|
69 | + * @return T |
|
70 | + */ |
|
71 | 71 | function ($value, CData $toCData) { |
72 | 72 | return $toCData[0] = $value; |
73 | 73 | }; |
74 | 74 | } else { |
75 | 75 | $input_converters[] = |
76 | 76 | /** |
77 | - * @template T |
|
78 | - * @param T $data |
|
79 | - * @return T |
|
80 | - */ |
|
77 | + * @template T |
|
78 | + * @param T $data |
|
79 | + * @return T |
|
80 | + */ |
|
81 | 81 | fn ($data) => $data; |
82 | 82 | $outout_converters[] = |
83 | 83 | /** |
84 | - * @template T |
|
85 | - * @template T2 |
|
86 | - * @param T $_1 |
|
87 | - * @param T2 $_2 |
|
88 | - * @return T |
|
89 | - */ |
|
84 | + * @template T |
|
85 | + * @template T2 |
|
86 | + * @param T $_1 |
|
87 | + * @param T2 $_2 |
|
88 | + * @return T |
|
89 | + */ |
|
90 | 90 | fn ($_1, $_2) => $_1; |
91 | 91 | } |
92 | 92 | } |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | $result = $callable(...$new_args); |
104 | 104 | foreach ($outout_converters as $key => $converter) { |
105 | 105 | /** |
106 | - * @psalm-suppress PossiblyInvalidArgument |
|
107 | - * @psalm-suppress MixedArgument |
|
108 | - */ |
|
106 | + * @psalm-suppress PossiblyInvalidArgument |
|
107 | + * @psalm-suppress MixedArgument |
|
108 | + */ |
|
109 | 109 | $args[$key] = $converter($new_args[$key], $args[$key]); |
110 | 110 | } |
111 | 111 | if ($result instanceof TypedCDataInterface) { |
@@ -39,25 +39,25 @@ discard block |
||
39 | 39 | $class = $parameter->getClass(); |
40 | 40 | if (!is_null($class) and $class->isSubclassOf(TypedCDataInterface::class)) { |
41 | 41 | $fromCData = $class->getMethod('fromCData'); |
42 | - $input_converters[] = function (CData $cdata) use ($fromCData): TypedCDataInterface { |
|
42 | + $input_converters[] = function(CData $cdata) use ($fromCData): TypedCDataInterface { |
|
43 | 43 | /** @var TypedCDataInterface */ |
44 | 44 | return $fromCData->invoke(null, $cdata); |
45 | 45 | }; |
46 | - $outout_converters[] = function (TypedCDataInterface $typed_c_data, CData $toCData): CData { |
|
46 | + $outout_converters[] = function(TypedCDataInterface $typed_c_data, CData $toCData): CData { |
|
47 | 47 | return $typed_c_data->toCData($toCData); |
48 | 48 | }; |
49 | 49 | } elseif (!is_null($class) and $class->getName() === TypedCDataArray::class) { |
50 | 50 | $fromCData = $class->getMethod('fromCData'); |
51 | 51 | $elementType = $this->getElementTypeForCDataArrayParameter($parameter); |
52 | - $input_converters[] = function (CData $cdata) use ($fromCData, $elementType): TypedCDataArray { |
|
52 | + $input_converters[] = function(CData $cdata) use ($fromCData, $elementType): TypedCDataArray { |
|
53 | 53 | /** @var TypedCDataArray */ |
54 | 54 | return $fromCData->invoke(null, $cdata, $elementType); |
55 | 55 | }; |
56 | - $outout_converters[] = function (TypedCDataArray $typed_c_data_array, CData $toCData): CData { |
|
56 | + $outout_converters[] = function(TypedCDataArray $typed_c_data_array, CData $toCData): CData { |
|
57 | 57 | return $typed_c_data_array->toCData($toCData); |
58 | 58 | }; |
59 | 59 | } elseif ($parameter->isPassedByReference()) { |
60 | - $input_converters[] = function (CData $cdata): CData { |
|
60 | + $input_converters[] = function(CData $cdata): CData { |
|
61 | 61 | /** @var \FFI\CDataArray $cdata */ |
62 | 62 | return $cdata[0]; |
63 | 63 | }; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param \FFI\CDataArray $toCData |
69 | 69 | * @return T |
70 | 70 | */ |
71 | - function ($value, CData $toCData) { |
|
71 | + function($value, CData $toCData) { |
|
72 | 72 | return $toCData[0] = $value; |
73 | 73 | }; |
74 | 74 | } else { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * @param T $data |
79 | 79 | * @return T |
80 | 80 | */ |
81 | - fn ($data) => $data; |
|
81 | + fn($data) => $data; |
|
82 | 82 | $outout_converters[] = |
83 | 83 | /** |
84 | 84 | * @template T |
@@ -87,13 +87,13 @@ discard block |
||
87 | 87 | * @param T2 $_2 |
88 | 88 | * @return T |
89 | 89 | */ |
90 | - fn ($_1, $_2) => $_1; |
|
90 | + fn($_1, $_2) => $_1; |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | 94 | return |
95 | 95 | /** @param mixed $args */ |
96 | - function (...$args) use ($input_converters, $outout_converters, $callable) { |
|
96 | + function(...$args) use ($input_converters, $outout_converters, $callable) { |
|
97 | 97 | $new_args = []; |
98 | 98 | foreach ($input_converters as $key => $converter) { |
99 | 99 | /** @psalm-suppress MixedArgument */ |