| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 19 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 35 | public function __construct(string $algorithm, string $path)  | 
            ||
| 36 |     { | 
            ||
| 37 | $algorithm = strtolower(  | 
            ||
| 38 | preg_replace(  | 
            ||
| 39 | '/[^A-Za-z0-9]+/',  | 
            ||
| 40 | '',  | 
            ||
| 41 | $algorithm  | 
            ||
| 42 | )  | 
            ||
| 43 | );  | 
            ||
| 44 | |||
| 45 | Assertion::inArray(  | 
            ||
| 46 | $algorithm,  | 
            ||
| 47 | hash_algos(),  | 
            ||
| 48 | 'Expected %s to be a known algorithm: "'  | 
            ||
| 49 |             .implode('", "', hash_algos()) | 
            ||
| 50 | .'"'  | 
            ||
| 51 | );  | 
            ||
| 52 | |||
| 53 | $this->context = hash_init($algorithm);  | 
            ||
| 54 | }  | 
            ||
| 74 |