17
17
use function str_repeat ;
18
18
use function strlen ;
19
19
20
- class MethodParameterFactory
20
+ /**
21
+ * @internal This class is not part of the BC promise of this library.
22
+ */
23
+ final class MethodParameterFactory
21
24
{
22
25
/**
23
26
* Formats the given default value to a string-able mixin
27
+ *
28
+ * @param mixed $defaultValue
29
+ * @return string
24
30
*/
25
31
public function format ($ defaultValue ): string
26
32
{
@@ -30,32 +36,36 @@ public function format($defaultValue): string
30
36
return '' ;
31
37
}
32
38
33
- protected function formatDouble (float $ defaultValue ): string
39
+ private function formatDouble (float $ defaultValue ): string
34
40
{
35
41
return var_export ($ defaultValue , true );
36
42
}
37
43
38
- protected function formatNull ($ defaultValue ): string
44
+ /**
45
+ * @param mixed $defaultValue
46
+ * @return string
47
+ */
48
+ private function formatNull ($ defaultValue ): string
39
49
{
40
50
return 'null ' ;
41
51
}
42
52
43
- protected function formatInteger (int $ defaultValue ): string
53
+ private function formatInteger (int $ defaultValue ): string
44
54
{
45
55
return var_export ($ defaultValue , true );
46
56
}
47
57
48
- protected function formatString (string $ defaultValue ): string
58
+ private function formatString (string $ defaultValue ): string
49
59
{
50
60
return var_export ($ defaultValue , true );
51
61
}
52
62
53
- protected function formatBoolean (bool $ defaultValue ): string
63
+ private function formatBoolean (bool $ defaultValue ): string
54
64
{
55
65
return var_export ($ defaultValue , true );
56
66
}
57
67
58
- protected function formatArray (array $ defaultValue ): string
68
+ private function formatArray (array $ defaultValue ): string
59
69
{
60
70
$ formatedValue = '[ ' ;
61
71
@@ -74,7 +84,7 @@ protected function formatArray(array $defaultValue): string
74
84
return $ formatedValue ;
75
85
}
76
86
77
- protected function formatObject (object $ defaultValue ): string
87
+ private function formatObject (object $ defaultValue ): string
78
88
{
79
89
return 'new ' . get_class ($ defaultValue ). '() ' ;
80
90
}
0 commit comments