We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | 107 | public static function encodeUrlSafe(string $value, bool $padding = false): string |
|
| 10 | { |
||
| 11 | 107 | $result = \base64_encode($value); |
|
| 12 | 107 | $result = \str_replace(['+', '/'], ['-', '_'], $result); |
|
| 13 | |||
| 14 | 107 | if (!$padding) { |
|
| 15 | 101 | $result = \str_replace('=', '', $result); |
|
| 16 | } |
||
| 17 | |||
| 18 | 107 | return $result; |
|
| 19 | } |
||
| 38 |