| @@ 210-221 (lines=12) @@ | ||
| 207 | * |
|
| 208 | * @return $this |
|
| 209 | */ |
|
| 210 | public function setSourceDir($sourceDir = null) |
|
| 211 | { |
|
| 212 | if ($sourceDir === null) { |
|
| 213 | $sourceDir = getcwd(); |
|
| 214 | } |
|
| 215 | if (!is_dir($sourceDir)) { |
|
| 216 | throw new \InvalidArgumentException(sprintf('The directory "%s" is not a valid source!', $sourceDir)); |
|
| 217 | } |
|
| 218 | $this->sourceDir = $sourceDir; |
|
| 219 | ||
| 220 | return $this; |
|
| 221 | } |
|
| 222 | ||
| 223 | /** |
|
| 224 | * Get the source directory. |
|
| @@ 242-253 (lines=12) @@ | ||
| 239 | * |
|
| 240 | * @return $this |
|
| 241 | */ |
|
| 242 | public function setDestinationDir($destinationDir = null) |
|
| 243 | { |
|
| 244 | if ($destinationDir === null) { |
|
| 245 | $destinationDir = $this->sourceDir; |
|
| 246 | } |
|
| 247 | if (!is_dir($destinationDir)) { |
|
| 248 | throw new \InvalidArgumentException(sprintf( |
|
| 249 | 'The directory "%s" is not a valid destination!', |
|
| 250 | $destinationDir |
|
| 251 | )); |
|
| 252 | } |
|
| 253 | $this->destinationDir = $destinationDir; |
|
| 254 | ||
| 255 | return $this; |
|
| 256 | } |
|