Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
13 | 2 | public function generate(Passbook $passbook, string $temporaryDirectory): void |
|
14 | { |
||
15 | 2 | $manifest = [Compiler::PASS_DATA_FILE => $this->hash(json_encode($passbook->getData()))]; |
|
16 | |||
17 | 2 | foreach ($passbook->getImages() as $file) { |
|
18 | 1 | $manifest[$file->getFilename()] = $this->hash($file->getContents()); |
|
19 | } |
||
20 | |||
21 | 2 | file_put_contents($temporaryDirectory . '/' . self::FILENAME, json_encode($manifest)); |
|
22 | 2 | } |
|
23 | |||
29 |