Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
52 | 1 | public function execute(Source $source) |
|
53 | { |
||
54 | 1 | foreach ($source->getDistFiles() as $key => $file) { |
|
55 | 1 | $pathFile = $file->getFullpath().$file->getDistpathname(); |
|
56 | 1 | $ext = $this->options['format'] ?: pathinfo($pathFile, PATHINFO_EXTENSION); |
|
57 | |||
58 | 1 | $content = (string) $this->manager |
|
59 | 1 | ->make($pathFile) |
|
60 | 1 | ->encode($ext, $this->options['quality']); |
|
61 | |||
62 | 1 | $file->setContent($content); |
|
63 | } |
||
66 |