@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | protected function scaleImage($width, $height) |
98 | 98 | { |
99 | - $this->img->resize($width, $height, function ($constraint) { |
|
99 | + $this->img->resize($width, $height, function($constraint) { |
|
100 | 100 | $constraint->aspectRatio(); |
101 | 101 | }); |
102 | 102 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | } |
162 | 162 | |
163 | - $this->img->fit($this->styleData['width'], $this->styleData['height'], function ($constraint) { |
|
163 | + $this->img->fit($this->styleData['width'], $this->styleData['height'], function($constraint) { |
|
164 | 164 | $constraint->upsize(); |
165 | 165 | }); |
166 | 166 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | ->add('title') |
29 | 29 | ->add('alt'); |
30 | 30 | |
31 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
31 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
32 | 32 | $image = $event->getData(); |
33 | 33 | $form = $event->getForm(); |
34 | 34 | // Conditionally add form elements. |
@@ -101,9 +101,9 @@ |
||
101 | 101 | $focusY2 = $this->focusCoordinates[3]; |
102 | 102 | |
103 | 103 | if ($type == 'near') { |
104 | - $point = ${'focus' . $axis . '1'} - ${'crop' . $axis . '1'}; |
|
104 | + $point = ${'focus' . $axis . '1'} -${'crop' . $axis . '1'}; |
|
105 | 105 | } else { |
106 | - $point = ${'focus' . $axis . '2'} - ${'crop' . $axis . '1'}; |
|
106 | + $point = ${'focus' . $axis . '2'} -${'crop' . $axis . '1'}; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | return $point; |
@@ -227,13 +227,13 @@ discard block |
||
227 | 227 | |
228 | 228 | // Check if the file exists on the server. |
229 | 229 | if (!$this->system->fileExists($filename)) { |
230 | - $fetchFromS3 = TRUE; |
|
230 | + $fetchFromS3 = TRUE; |
|
231 | 231 | } |
232 | 232 | $tree = $this->system->getUploadsDirectory() . '/' . $filename; |
233 | 233 | // If the policy was set to keep no files locally, then original should be downloaded from s3. |
234 | 234 | if (!empty($fetchFromS3)) { |
235 | - $s3key = empty($this->config['aws_s3']['directory']) ? $tree : $this->config['aws_s3']['directory'] . '/' . $tree; |
|
236 | - $this->system->directoryExists($directory , TRUE); |
|
235 | + $s3key = empty($this->config['aws_s3']['directory']) ? $tree : $this->config['aws_s3']['directory'] . '/' . $tree; |
|
236 | + $this->system->directoryExists($directory, TRUE); |
|
237 | 237 | $this->s3->fetchS3Object($path, $s3key); |
238 | 238 | } |
239 | 239 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | $enabled = $this->s3enabled(); |
267 | 267 | if ($enabled) { |
268 | 268 | $aws_config = $this->config['aws_s3']; |
269 | - $remoteFilePolicy = empty($aws_config['remote_file_policy']) ? 'ALL': $aws_config['remote_file_policy']; |
|
269 | + $remoteFilePolicy = empty($aws_config['remote_file_policy']) ? 'ALL' : $aws_config['remote_file_policy']; |
|
270 | 270 | |
271 | 271 | // If AWS is enabled. |
272 | 272 | if ($enabled) { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $question = new Question($questionHelper->getQuestion('The bundle name', $input->getOption('bundle')), $input->getOption('bundle')); |
41 | 41 | |
42 | 42 | $question->setValidator(['Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateBundleName']); |
43 | - $question->setNormalizer(function ($value) { |
|
43 | + $question->setNormalizer(function($value) { |
|
44 | 44 | return $value ? trim($value) : ''; |
45 | 45 | }); |
46 | 46 | $question->setMaxAttempts(2); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | // Get the new class name and validate it. |
58 | 58 | $question = new Question($questionHelper->getQuestion('The entity name', $input->getOption('entity_name')), $input->getOption('entity_name')); |
59 | - $question->setValidator(function ($answer) { |
|
59 | + $question->setValidator(function($answer) { |
|
60 | 60 | // Should only contain letters. |
61 | 61 | $valid = preg_match('/^[a-zA-Z]+$/', $answer); |
62 | 62 | if (!$valid) { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | return $answer; |
69 | 69 | }); |
70 | - $question->setNormalizer(function ($value) { |
|
70 | + $question->setNormalizer(function($value) { |
|
71 | 71 | return $value ? trim($value) : ''; |
72 | 72 | }); |
73 | 73 |