Passed
Pull Request — master (#27)
by
unknown
04:54
created
src/Imagery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         return  cache()->remember(
26 26
             implode('-', $keyElements),
27 27
             9999999999,
28
-            function () use ($source, $width, $height, $htmlAttributes, $options) {
28
+            function() use ($source, $width, $height, $htmlAttributes, $options) {
29 29
                 return new Image($source, $width, $height, $htmlAttributes, $options);
30 30
             }
31 31
         );
Please login to merge, or discard this patch.
src/Providers/LaravelImageryService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
         $this->commands(Clear::class);
37 37
         $this->commands(Publish::class);
38
-        $this->app->singleton('imagery', function () {
38
+        $this->app->singleton('imagery', function() {
39 39
             return new Imagery();
40 40
         });
41 41
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             throw new Exception("Blade directive '{$directive}' is already registered.");
52 52
         }
53 53
 
54
-        app('blade.compiler')->directive($directive, function ($parameters) use ($type) {
54
+        app('blade.compiler')->directive($directive, function($parameters) use ($type) {
55 55
             $parameters = trim($parameters, "()");
56 56
 
57 57
             return "<?php echo app('imagery')->conjure({$parameters})->{$type}; ?>";
Please login to merge, or discard this patch.
src/Console/Commands/Publish.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
 
33 33
     private function delTree($folder)
34 34
     {
35
-        if (! is_dir($folder)) {
35
+        if (!is_dir($folder)) {
36 36
             return false;
37 37
         }
38 38
 
39
-        $files = array_diff(scandir($folder), ['.','..']);
39
+        $files = array_diff(scandir($folder), ['.', '..']);
40 40
 
41 41
         foreach ($files as $file) {
42 42
             is_dir("$folder/$file") ? $this->delTree("$folder/$file") : unlink("$folder/$file");
Please login to merge, or discard this patch.
src/Image.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         $this->resizeImage($this->width, $this->height, $this->alwaysPreserveAspectRatio);
42 42
 
43
-        if (! $this->doNotCreateDerivativeImages) {
43
+        if (!$this->doNotCreateDerivativeImages) {
44 44
             $job = (new RenderDerivativeImages($this->source))->onQueue('imagery');
45 45
             dispatch($job);
46 46
         }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     protected function resizeImage(int $width, int $height, bool $alwaysPreserveAspect = false)
50 50
     {
51
-        if (! $height || ! $width) {
51
+        if (!$height || !$width) {
52 52
             $height = $height ?: $this->image->getHeight();
53 53
             $width = $width ?: $this->image->getWidth();
54 54
         }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $height = $this->determineHeight($height, $screenHeight);
61 61
         $width = $this->determineWidth($width, $screenWidth);
62 62
 
63
-        if (! $height && ! $width) {
63
+        if (!$height && !$width) {
64 64
             $height = $this->image->height();
65 65
             $width = $this->image->width();
66 66
         }
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
         $maxHeight = $this->determineMaxHeight($height, $screenHeight, $screenWidth);
69 69
         $maxWidth = $this->determineMaxWidth($width, $screenHeight, $screenWidth);
70 70
 
71
-        $this->image->resize($maxWidth, $maxHeight, function ($constraint) use ($alwaysPreserveAspect) {
72
-            if ($alwaysPreserveAspect || ! $width || ! $height) {
71
+        $this->image->resize($maxWidth, $maxHeight, function($constraint) use ($alwaysPreserveAspect) {
72
+            if ($alwaysPreserveAspect || !$width || !$height) {
73 73
                 $constraint->aspectRatio();
74 74
             }
75 75
 
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
     //TODO: refactor to have a single return type, instead of null or int
85 85
     protected function determineMaxHeight($height, $screenHeight, $screenWidth)
86 86
     {
87
-        if (! $screenHeight || ! $screenWidth) {
87
+        if (!$screenHeight || !$screenWidth) {
88 88
             return $height;
89 89
         }
90 90
 
91 91
         $maxHeight = $height ?: $this->image->height();
92 92
 
93
-        if (! $this->overrideScreenConstraint) {
93
+        if (!$this->overrideScreenConstraint) {
94 94
             $maxHeight = $screenHeight < $maxHeight ? $screenHeight : $maxHeight;
95 95
 
96 96
             if ($this->screenConstraintMethod === 'cover') {
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
     //TODO: refactor to have a single return type, instead of null or int
110 110
     protected function determineMaxWidth($width, $screenHeight, $screenWidth)
111 111
     {
112
-        if (! $screenHeight || ! $screenWidth) {
112
+        if (!$screenHeight || !$screenWidth) {
113 113
             return $width;
114 114
         }
115 115
 
116 116
         $maxWidth = $width ?: $this->image->width();
117 117
 
118
-        if (! $this->overrideScreenConstraint) {
118
+        if (!$this->overrideScreenConstraint) {
119 119
             $maxWidth = $screenWidth < $maxWidth ? $screenWidth : $maxWidth;
120 120
 
121 121
             if ($this->screenConstraintMethod === 'cover') {
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $scriptUrl = mix('js/cookie.js', 'genealabs-laravel-imagery');
179 179
         $attributes = '';
180 180
 
181
-        $attributes = $this->htmlAttributes->map(function ($value, $attribute) use (&$attributes) {
181
+        $attributes = $this->htmlAttributes->map(function($value, $attribute) use (&$attributes) {
182 182
             return " {$attribute}=\"{$value}\"";
183 183
         })->implode('');
184 184
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     {
237 237
         app('filesystem')->disk('public')->makeDirectory(config('genealabs-laravel-imagery.storage-folder'));
238 238
 
239
-        if (! file_exists(public_path(config('genealabs-laravel-imagery.storage-folder')))) {
239
+        if (!file_exists(public_path(config('genealabs-laravel-imagery.storage-folder')))) {
240 240
             symlink(
241 241
                 rtrim(storage_path('app/public/' . config('genealabs-laravel-imagery.storage-folder')), '/'),
242 242
                 rtrim(public_path(config('genealabs-laravel-imagery.storage-folder')), '/')
Please login to merge, or discard this patch.