Total Complexity | 3 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class SprintfToPH extends AbstractHandler { |
||
12 | |||
13 | private $source; |
||
|
|||
14 | private $target; |
||
15 | |||
16 | 89 | public function __construct() { |
|
17 | 89 | parent::__construct(); |
|
18 | 89 | } |
|
19 | |||
20 | /** |
||
21 | * TestSet: |
||
22 | * <code> |
||
23 | * |%-4d|%-4d| |
||
24 | * |%':4d| |
||
25 | * |%-':4d| |
||
26 | * |%-'04d| |
||
27 | * %02.2f |
||
28 | * %02d |
||
29 | * %1$s! |
||
30 | * %08b |
||
31 | * 20%-os - ignored |
||
32 | * 20%-dir - ignored |
||
33 | * 20%-zar - ignored |
||
34 | *</code> |
||
35 | * |
||
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 | * @param $segment |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | 87 | public function transform( $segment ) { |
|
73 | } |
||
74 | |||
75 | } |