@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | $sprite = new Sprite($images, $layout, $scaleToPx); |
55 | 55 | $sprite->generate(); |
56 | - $sprite->saveOutput($dirOut, $outName, [$cssPrefix, $cssSuffix, $outName, $relativeUrl,]); |
|
56 | + $sprite->saveOutput($dirOut, $outName, [$cssPrefix, $cssSuffix, $outName, $relativeUrl, ]); |
|
57 | 57 | |
58 | 58 | print "Folder/filter processed\n\n"; |
59 | 59 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $images = []; |
102 | 102 | |
103 | 103 | foreach (scandir($dirRealPath) as $fileNameOnly) { |
104 | - if (in_array($fileNameOnly, ['.', '..',]) || is_dir($fullPath = "$dirRealPath/$fileNameOnly")) { |
|
104 | + if (in_array($fileNameOnly, ['.', '..', ]) || is_dir($fullPath = "$dirRealPath/$fileNameOnly")) { |
|
105 | 105 | continue; |
106 | 106 | } |
107 | 107 | $images = self::tryReadFile($fullPath, $images); |
@@ -33,10 +33,10 @@ |
||
33 | 33 | $gifDecoder = new Decoder($gifStream); |
34 | 34 | |
35 | 35 | /** Run decoder. Pass callback function to process decoded Frames when they're ready. */ |
36 | - $gifDecoder->decode(function (FrameDecodedEvent $event) { |
|
36 | + $gifDecoder->decode(function(FrameDecodedEvent $event) { |
|
37 | 37 | $this->frames[] = $event->decodedFrame; |
38 | 38 | |
39 | - $this->width += $event->decodedFrame->getSize()->getWidth(); |
|
39 | + $this->width += $event->decodedFrame->getSize()->getWidth(); |
|
40 | 40 | $this->maxWidth = max($this->maxWidth, $event->decodedFrame->getSize()->getWidth()); |
41 | 41 | |
42 | 42 | $this->height = max($this->height, $event->decodedFrame->getSize()->getHeight()); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * @return static|null |
28 | 28 | */ |
29 | 29 | public function fillLine($image, $gridSize) { |
30 | - if($image->isAnimatedGif()) { |
|
30 | + if ($image->isAnimatedGif()) { |
|
31 | 31 | $line = new SpriteLineGif(); |
32 | 32 | } else { |
33 | 33 | $line = $this->isFull($gridSize) ? new static() : $this; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $line->generate($this->height, $scaleToPx); |
81 | 81 | |
82 | 82 | $this->height += $line->height; |
83 | - $this->width = max($this->width, $line->width); |
|
83 | + $this->width = max($this->width, $line->width); |
|
84 | 84 | |
85 | 85 | // $line->image->savePng(__DIR__ . '/../gif_line_' . $this->height . '.png'); // TODO remove debug |
86 | 86 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | protected function createGrid() { |
165 | 165 | $this->lineIndex = 0; |
166 | 166 | |
167 | - usort($this->imageList, function (ImageFile $a, ImageFile $b) { return $b->height - $a->height; }); |
|
167 | + usort($this->imageList, function(ImageFile $a, ImageFile $b) { return $b->height - $a->height; }); |
|
168 | 168 | |
169 | 169 | $prevLine = new SpriteLine(); |
170 | 170 | foreach ($this->imageList as $image) { |