| Conditions | 1 |
| Paths | 1 |
| Total Lines | 41 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 20 | public function register(Container $dic) |
|
| 24 | { |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return array |
||
| 28 | */ |
||
| 29 | 1 | $dic['UUID.config'] = function( $dic ) { |
|
|
|
|||
| 30 | 5 | return $this->config; |
|
| 31 | }; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return Ramsey\Uuid\Uuid |
||
| 35 | */ |
||
| 36 | 5 | $dic['UUID.new'] = $dic->factory(function( $dic ) { |
|
| 37 | 20 | return Uuid::uuid4(); |
|
| 38 | 25 | }); |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | 5 | $dic['UUID.new.hex'] = $dic->factory(function( $dic ) { |
|
| 44 | 10 | return $dic['UUID.new']->getHex(); |
|
| 45 | 25 | }); |
|
| 46 | |||
| 47 | |||
| 48 | /** |
||
| 49 | * @return Callable |
||
| 50 | */ |
||
| 51 | 5 | $dic['UUID.Factory'] = $dic->protect(function() use ($dic) { |
|
| 52 | 5 | return $dic['UUID.new']; |
|
| 53 | 25 | }); |
|
| 54 | |||
| 55 | /** |
||
| 56 | * @return Callable |
||
| 57 | */ |
||
| 58 | 10 | $dic['UUID.HexFactory'] = $dic->protect(function() use ($dic) { |
|
| 59 | 5 | return $dic['UUID.new.hex']; |
|
| 60 | 25 | }); |
|
| 61 | |||
| 62 | |||
| 63 | 25 | } |
|
| 64 | } |
||
| 65 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.