Total Complexity | 3 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class SprintfToPH extends AbstractHandler { |
||
12 | |||
13 | 98 | public function __construct() { |
|
14 | 98 | parent::__construct(); |
|
15 | } |
||
16 | |||
17 | /** |
||
18 | * TestSet: |
||
19 | * <code> |
||
20 | * |%-4d|%-4d| |
||
21 | * |%':4d| |
||
22 | * |%-':4d| |
||
23 | * |%-'04d| |
||
24 | * %02.2f |
||
25 | * %02d |
||
26 | * %1$s! |
||
27 | * %08b |
||
28 | * 20%-os - ignored |
||
29 | * 20%-dir - ignored |
||
30 | * 20%-zar - ignored |
||
31 | *</code> |
||
32 | * |
||
33 | * @param $segment |
||
34 | * |
||
35 | * @return string |
||
36 | * @see |
||
37 | * - https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW1 |
||
38 | * - https://en.cppreference.com/w/c/io/fprintf |
||
39 | * - https://www.php.net/manual/en/function.sprintf.php |
||
40 | * - https://www.w3resource.com/c-programming/stdio/c_library_method_sprintf.php |
||
41 | * |
||
42 | */ |
||
43 | 88 | public function transform( string $segment ): string { |
|
68 | } |
||
69 | |||
70 | } |