@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | 'word/header*.xml', |
30 | 30 | ]; |
31 | 31 | |
32 | - public function __construct($items, $local_template_file, $storageDisk = 'local', $storagePathPrefix = 'app/', $imageManipulation='') |
|
32 | + public function __construct($items, $local_template_file, $storageDisk = 'local', $storagePathPrefix = 'app/', $imageManipulation = '') |
|
33 | 33 | { |
34 | 34 | $this->items = $items; |
35 | 35 | $this->template_file_name = basename($local_template_file); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $fileWhitelist = $this->fileWhitelist; |
114 | 114 | $this->zipper |
115 | 115 | ->make($this->StoragePath($this->local_path.$this->template_file_name)) |
116 | - ->getRepository()->each(function ($file, $stats) use ($fileWhitelist, &$filelist) { |
|
116 | + ->getRepository()->each(function($file, $stats) use ($fileWhitelist, &$filelist) { |
|
117 | 117 | foreach ($fileWhitelist as $pattern) { |
118 | 118 | if (fnmatch($pattern, $file)) { |
119 | 119 | $filelist[] = $file; |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | { |
215 | 215 | $ct_file = $this->ReadOpenXmlFile('[Content_Types].xml', 'object'); |
216 | 216 | |
217 | - if (! ($ct_file instanceof \Traversable)) { |
|
217 | + if (!($ct_file instanceof \Traversable)) { |
|
218 | 218 | throw new Exception('Cannot traverse through [Content_Types].xml.'); |
219 | 219 | } |
220 | 220 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | //if content type for jpg has not been set, add it to xml |
232 | 232 | // and save xml to file and add it to the archive |
233 | - if (! $ct_already_set) { |
|
233 | + if (!$ct_already_set) { |
|
234 | 234 | $sxe = $ct_file->addChild('Default'); |
235 | 235 | $sxe->addAttribute('Extension', $imageCt); |
236 | 236 | $sxe->addAttribute('ContentType', 'image/'.$imageCt); |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | $valid = true; |
467 | 467 | |
468 | 468 | //TODO: create a better url validity check |
469 | - if (! trim(str_replace(['http', 'https', ':', ' '], '', $url)) || $url == str_replace('http', '', $url)) { |
|
469 | + if (!trim(str_replace(['http', 'https', ':', ' '], '', $url)) || $url == str_replace('http', '', $url)) { |
|
470 | 470 | $valid = false; |
471 | 471 | } |
472 | 472 | $mode = 'url'; |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | $valid = true; |
490 | 490 | |
491 | 491 | //check if path starts with storage path |
492 | - if (! starts_with($path, storage_path())) { |
|
492 | + if (!starts_with($path, storage_path())) { |
|
493 | 493 | $valid = false; |
494 | 494 | } |
495 | 495 | $mode = 'path'; |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | //wait until process is ready |
528 | 528 | } |
529 | 529 | // executes after the command finishes |
530 | - if (! $process->isSuccessful()) { |
|
530 | + if (!$process->isSuccessful()) { |
|
531 | 531 | throw new \Symfony\Component\Process\Exception\ProcessFailedException($process); |
532 | 532 | } else { |
533 | 533 | $path_parts = pathinfo($this->StoragePath($this->local_path.$this->template_file_name)); |