src/Modify/Compress/FindCompression.php 1 location
|
@@ 84-93 (lines=10) @@
|
81 |
|
* |
82 |
|
* @return FileNodeInterface |
83 |
|
*/ |
84 |
|
public function modify(FileNodeInterface $file, array $options = []) |
85 |
|
{ |
86 |
|
if (!$this->canModify($file) || !($file instanceof LocalFileNodeInterface)) { |
87 |
|
throw new InvalidArgumentException("The supplied file: '$file' does not implement LocalFileNodeInterface'"); |
88 |
|
} |
89 |
|
|
90 |
|
$file->setCompression($this->getCompression($file)); |
91 |
|
|
92 |
|
return $file; |
93 |
|
} |
94 |
|
} |
95 |
|
|
src/Modify/Encoding/FindEncoding.php 1 location
|
@@ 69-80 (lines=12) @@
|
66 |
|
* @return FileNodeInterface |
67 |
|
* @throws InvalidArgumentException |
68 |
|
*/ |
69 |
|
public function modify(FileNodeInterface $file, array $options = []) |
70 |
|
{ |
71 |
|
if (!$this->canModify($file) || !($file instanceof LocalFileNodeInterface)) { |
72 |
|
throw new InvalidArgumentException( |
73 |
|
"The specified file: '$file' does not implement LocalFileNodeInterface'" |
74 |
|
); |
75 |
|
} |
76 |
|
|
77 |
|
$file->setEncoding($this->getEncoding($file)); |
78 |
|
|
79 |
|
return $file; |
80 |
|
} |
81 |
|
} |
82 |
|
|