Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function write(Changes $changes) : void |
||
22 | { |
||
23 | $arrayOfChanges = $changes->getIterator()->getArrayCopy(); |
||
24 | |||
25 | file_put_contents( |
||
26 | $this->outputFilename, |
||
27 | "# Added\n" |
||
28 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
||
29 | function (Change $change) : bool { |
||
30 | return $change->isAdded(); |
||
31 | }, |
||
32 | ...$arrayOfChanges |
||
33 | )) |
||
34 | . "\n# Changed\n" |
||
35 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
||
36 | function (Change $change) : bool { |
||
37 | return $change->isChanged(); |
||
38 | }, |
||
39 | ...$arrayOfChanges |
||
40 | )) |
||
41 | . "\n# Removed\n" |
||
42 | . implode('', $this->convertFilteredChangesToMarkdownBulletList( |
||
43 | function (Change $change) : bool { |
||
44 | return $change->isRemoved(); |
||
45 | }, |
||
46 | ...$arrayOfChanges |
||
47 | )) |
||
61 |