Skip to content

Commit

Permalink
Merge pull request #16 from wrklst/analysis-XVO63w
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
tobiasvielmetter authored Jul 1, 2017
2 parents 94b02d1 + 2e9e4e6 commit 6d2768e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/WrkLst/DocxMustache/DocxMustache.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ protected function InsertImages($ns, &$imgs, &$rels_file, &$main_file)
//iterate through replacable images
foreach ($imgs as $k=>$img) {
//get file type of img and test it against supported imgs
if ($imgageData = $docimage->GetImageFromUrl($img['mode']=='url'?$img['url']:$img['path'], $img['mode']=='url'?$this->imageManipulation:'')) {
if ($imgageData = $docimage->GetImageFromUrl($img['mode'] == 'url' ? $img['url'] : $img['path'], $img['mode'] == 'url' ? $this->imageManipulation : '')) {
$imgs[$k]['img_file_src'] = str_replace('wrklstId', 'wrklst_image', $img['id']).$allowed_imgs[$imgageData['mime']];
$imgs[$k]['img_file_dest'] = str_replace('wrklstId', 'wrklst_image', $img['id']).'.jpeg';

Expand Down Expand Up @@ -381,7 +381,7 @@ protected function AnalyseImgUrlString($string)
} else {
$ini += strlen($start_local);
$len = ((strpos($string, $end_local, $ini)) - $ini);
$path = str_replace("..","",substr($string, $ini, $len));
$path = str_replace('..', '', substr($string, $ini, $len));

$ini = strpos($string, $start_local);
$len = strpos($string, $end_local, $ini + strlen($start)) + strlen($end_local);
Expand All @@ -391,7 +391,7 @@ protected function AnalyseImgUrlString($string)
$valid = true;

//check if path starts with storage path
if (!starts_with($path,storage_path())) {
if (! starts_with($path, storage_path())) {
$valid = false;
}
$mode = 'path';
Expand Down

0 comments on commit 6d2768e

Please sign in to comment.