@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | - * @param $id |
|
| 58 | + * @param string $id |
|
| 59 | 59 | * |
| 60 | 60 | * @return object |
| 61 | 61 | */ |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * @param $key |
|
| 67 | + * @param string $key |
|
| 68 | 68 | * |
| 69 | 69 | * @return mixed|null |
| 70 | 70 | */ |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | - * @return mixed |
|
| 87 | + * @return string |
|
| 88 | 88 | */ |
| 89 | 89 | public function getTemplateExtension() { |
| 90 | 90 | return 'tpl'; |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use brendt\stitcher\Config; |
| 6 | 6 | use brendt\stitcher\engine\TemplateEngine; |
| 7 | -use Symfony\Component\Finder\Finder; |
|
| 8 | 7 | use \Smarty; |
| 9 | 8 | use Symfony\Component\Finder\SplFileInfo; |
| 10 | 9 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** @var SplFileInfo[] $files */ |
| 63 | - $files = $finder->files()->in($this->imageDir)->path(trim($path,'/')); |
|
| 63 | + $files = $finder->files()->in($this->imageDir)->path(trim($path, '/')); |
|
| 64 | 64 | |
| 65 | 65 | foreach ($files as $file) { |
| 66 | 66 | $image = new Image($file->getPathname(), $file->getRelativePathname()); |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | use brendt\stitcher\Stitcher; |
| 7 | 7 | use Symfony\Component\Finder\Finder; |
| 8 | 8 | |
| 9 | -class FolderProvider extends AbstractProvider { |
|
| 9 | +class FolderProvider extends AbstractProvider { |
|
| 10 | 10 | |
| 11 | 11 | public function parse($path) { |
| 12 | 12 | $data = []; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | const SASS_PROVIDER = 'sass'; |
| 25 | 25 | const SCSS_PROVIDER = 'scss'; |
| 26 | 26 | |
| 27 | - private $providers = []; |
|
| 27 | + private $providers = []; |
|
| 28 | 28 | |
| 29 | 29 | private $root; |
| 30 | 30 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | return $this->getByType(self::IMAGE_PROVIDER); |
| 59 | 59 | } else if (strpos($file, '.css') !== false) { |
| 60 | 60 | return $this->getByType(self::CSS_PROVIDER); |
| 61 | - } else if (strpos($file, '.js') !== false) { |
|
| 61 | + } else if (strpos($file, '.js') !== false) { |
|
| 62 | 62 | return $this->getByType(self::JS_PROVIDER); |
| 63 | 63 | } else if (strpos($file, '.scss') !== false || strpos($file, '.sass') !== false) { |
| 64 | 64 | return $this->getByType(self::SASS_PROVIDER); |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | return $this->getByType(self::IMAGE_PROVIDER); |
| 59 | 59 | } else if (strpos($file, '.css') !== false) { |
| 60 | 60 | return $this->getByType(self::CSS_PROVIDER); |
| 61 | - } else if (strpos($file, '.js') !== false) { |
|
| 61 | + } else if (strpos($file, '.js') !== false) { |
|
| 62 | 62 | return $this->getByType(self::JS_PROVIDER); |
| 63 | 63 | } else if (strpos($file, '.scss') !== false || strpos($file, '.sass') !== false) { |
| 64 | 64 | return $this->getByType(self::SASS_PROVIDER); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | throw new ResourceNotFoundException(); |
| 54 | 54 | } catch (StitcherException $e) { |
| 55 | 55 | echo $e->getMessage(); |
| 56 | - }catch (ResourceNotFoundException $e) { |
|
| 56 | + } catch (ResourceNotFoundException $e) { |
|
| 57 | 57 | echo "404"; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | throw new ResourceNotFoundException(); |
| 54 | 54 | } catch (StitcherException $e) { |
| 55 | 55 | echo $e->getMessage(); |
| 56 | - }catch (ResourceNotFoundException $e) { |
|
| 56 | + } catch (ResourceNotFoundException $e) { |
|
| 57 | 57 | echo "404"; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | protected function getImageFile($path) { |
| 69 | 69 | $imageFile = null; |
| 70 | 70 | |
| 71 | - if ($this->extension ==='jpg') { |
|
| 71 | + if ($this->extension === 'jpg') { |
|
| 72 | 72 | $imageFile = imagecreatefromjpeg($path); |
| 73 | 73 | } elseif ($this->extension === 'png') { |
| 74 | 74 | $imageFile = imagecreatefrompng($path); |