| @@ 103-113 (lines=11) @@ | ||
| 100 | * |
|
| 101 | * @throws \InvalidArgumentException |
|
| 102 | */ |
|
| 103 | public function copyFiles(PackageEvent $event) |
|
| 104 | { |
|
| 105 | if (file_exists($this->installer->getVendorPath())) { |
|
| 106 | $this->copyModule(); |
|
| 107 | } |
|
| 108 | ||
| 109 | $extras = $event->getComposer()->getPackage()->getExtra(); |
|
| 110 | if (array_key_exists('copy-files', $extras)) { |
|
| 111 | $this->copyExtras($extras['copy-files']); |
|
| 112 | } |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * Hook which is called before update package |
|
| @@ 120-130 (lines=11) @@ | ||
| 117 | * |
|
| 118 | * It checks bluz module |
|
| 119 | */ |
|
| 120 | public function removeFiles(PackageEvent $event) |
|
| 121 | { |
|
| 122 | if (file_exists($this->installer->getVendorPath())) { |
|
| 123 | $this->removeModule(); |
|
| 124 | } |
|
| 125 | ||
| 126 | $extras = $event->getComposer()->getPackage()->getExtra(); |
|
| 127 | if (array_key_exists('copy-files', $extras)) { |
|
| 128 | $this->removeExtras($extras['copy-files']); |
|
| 129 | } |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * Get Filesystem |
|