1717use function str_repeat ;
1818use function strlen ;
1919
20- class MethodParameterFactory
20+ /**
21+ * @internal This class is not part of the BC promise of this library.
22+ */
23+ final class MethodParameterFactory
2124{
2225 /**
2326 * Formats the given default value to a string-able mixin
27+ *
28+ * @param mixed $defaultValue
29+ * @return string
2430 */
2531 public function format ($ defaultValue ): string
2632 {
@@ -30,32 +36,36 @@ public function format($defaultValue): string
3036 return '' ;
3137 }
3238
33- protected function formatDouble (float $ defaultValue ): string
39+ private function formatDouble (float $ defaultValue ): string
3440 {
3541 return var_export ($ defaultValue , true );
3642 }
3743
38- protected function formatNull ($ defaultValue ): string
44+ /**
45+ * @param mixed $defaultValue
46+ * @return string
47+ */
48+ private function formatNull ($ defaultValue ): string
3949 {
4050 return 'null ' ;
4151 }
4252
43- protected function formatInteger (int $ defaultValue ): string
53+ private function formatInteger (int $ defaultValue ): string
4454 {
4555 return var_export ($ defaultValue , true );
4656 }
4757
48- protected function formatString (string $ defaultValue ): string
58+ private function formatString (string $ defaultValue ): string
4959 {
5060 return var_export ($ defaultValue , true );
5161 }
5262
53- protected function formatBoolean (bool $ defaultValue ): string
63+ private function formatBoolean (bool $ defaultValue ): string
5464 {
5565 return var_export ($ defaultValue , true );
5666 }
5767
58- protected function formatArray (array $ defaultValue ): string
68+ private function formatArray (array $ defaultValue ): string
5969 {
6070 $ formatedValue = '[ ' ;
6171
@@ -74,7 +84,7 @@ protected function formatArray(array $defaultValue): string
7484 return $ formatedValue ;
7585 }
7686
77- protected function formatObject (object $ defaultValue ): string
87+ private function formatObject (object $ defaultValue ): string
7888 {
7989 return 'new ' . get_class ($ defaultValue ). '() ' ;
8090 }
0 commit comments