| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function sign($path, array $runtimeConfig = null) |
||
| 24 | { |
||
| 25 | if ($runtimeConfig) { |
||
| 26 | array_walk_recursive($runtimeConfig, function (&$value) { |
||
| 27 | $value = (string) $value; |
||
| 28 | }); |
||
| 29 | } |
||
| 30 | |||
| 31 | return substr(preg_replace('/[^a-zA-Z0-9-_]/', '', base64_encode(hash_hmac('sha256', ltrim($path, '/').(null === $runtimeConfig ?: serialize($runtimeConfig)), $this->secret, true))), 0, 8); |
||
| 32 | } |
||
| 33 | |||
| 42 |