1 | <?php |
||
9 | trait DeCompressorTrait |
||
10 | { |
||
11 | /** |
||
12 | * Decompress a file and return the decompressed file |
||
13 | * |
||
14 | * @param LocalFileNodeInterface $node |
||
15 | * @param array $options |
||
16 | * |
||
17 | * @return LocalFileNodeInterface |
||
18 | */ |
||
19 | 12 | public function decompress(LocalFileNodeInterface $node, array $options = []) |
|
43 | |||
44 | /** |
||
45 | * Abstract Log function that might should be handed by the OptionalLoggerTrait or similar |
||
46 | * |
||
47 | * @param string $level |
||
48 | * @param string $message |
||
49 | * @param array $context |
||
50 | * |
||
51 | * @return void |
||
52 | */ |
||
53 | abstract protected function log($level, $message, array $context = []); |
||
54 | |||
55 | /** |
||
56 | * @param LocalFileNodeInterface $node |
||
57 | * @param LocalFileNodeInterface $outputFile |
||
58 | * @param string $cmd |
||
59 | * @param bool $keepOld |
||
60 | * |
||
61 | * @return LocalFileNodeInterface |
||
62 | */ |
||
63 | abstract protected function processFile( |
||
69 | |||
70 | /** |
||
71 | * @return string |
||
72 | */ |
||
73 | abstract public function getExtension(); |
||
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | abstract public function getName(); |
||
79 | |||
80 | /** |
||
81 | * Get the command line to decompress a file |
||
82 | * |
||
83 | * @param LocalFileNodeInterface $from |
||
84 | * @param LocalFileNodeInterface $to |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | abstract public function getDecompressCommand(LocalFileNodeInterface $from, LocalFileNodeInterface $to); |
||
89 | } |
||
90 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.