@@ -27,15 +27,15 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $uploadedFile = $this->getMockFileUpload(); |
| 29 | 29 | $uploadedFile->expects($this->once()) |
| 30 | - ->method('getClientOriginalExtension') |
|
| 31 | - ->will( |
|
| 32 | - $this->returnValue('jpg') |
|
| 33 | - ); |
|
| 30 | + ->method('getClientOriginalExtension') |
|
| 31 | + ->will( |
|
| 32 | + $this->returnValue('jpg') |
|
| 33 | + ); |
|
| 34 | 34 | $uploadedFile->expects($this->once()) |
| 35 | - ->method('guessExtension') |
|
| 36 | - ->will( |
|
| 37 | - $this->returnValue('jpg') |
|
| 38 | - ); |
|
| 35 | + ->method('guessExtension') |
|
| 36 | + ->will( |
|
| 37 | + $this->returnValue('jpg') |
|
| 38 | + ); |
|
| 39 | 39 | |
| 40 | 40 | // Test the validator. |
| 41 | 41 | $validator = new FileValidator(); |
@@ -49,15 +49,15 @@ discard block |
||
| 49 | 49 | { |
| 50 | 50 | $uploadedFile = $this->getMockFileUpload(); |
| 51 | 51 | $uploadedFile->expects($this->once()) |
| 52 | - ->method('getClientOriginalExtension') |
|
| 53 | - ->will( |
|
| 54 | - $this->returnValue('doc') |
|
| 55 | - ); |
|
| 52 | + ->method('getClientOriginalExtension') |
|
| 53 | + ->will( |
|
| 54 | + $this->returnValue('doc') |
|
| 55 | + ); |
|
| 56 | 56 | $uploadedFile->expects($this->once()) |
| 57 | - ->method('guessExtension') |
|
| 58 | - ->will( |
|
| 59 | - $this->returnValue('doc') |
|
| 60 | - ); |
|
| 57 | + ->method('guessExtension') |
|
| 58 | + ->will( |
|
| 59 | + $this->returnValue('doc') |
|
| 60 | + ); |
|
| 61 | 61 | |
| 62 | 62 | // Test the validator. |
| 63 | 63 | $validator = new FileValidator(); |
@@ -61,8 +61,8 @@ |
||
| 61 | 61 | $message = 'Too wide: ' . $focusCropData['width'] . '<=' . $width; |
| 62 | 62 | $this->assertTrue($focusCropData['width'] <= $width, $message); |
| 63 | 63 | |
| 64 | - $message = 'Too high: ' . (int)round($focusCropData['height']) . ' <= ' . $height; |
|
| 65 | - $this->assertTrue((int)round($focusCropData['height']) <= (int)$height, $message); |
|
| 64 | + $message = 'Too high: ' . (int) round($focusCropData['height']) . ' <= ' . $height; |
|
| 65 | + $this->assertTrue((int) round($focusCropData['height']) <= (int) $height, $message); |
|
| 66 | 66 | |
| 67 | 67 | $this->assertTrue($focusCropData['x'] >= $imageCoordinates['crop_coordinates'][0]); // x1 |
| 68 | 68 | $this->assertTrue($focusCropData['y'] >= $imageCoordinates['crop_coordinates'][1]); // y1 |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use Symfony\Bundle\MakerBundle\DependencyBuilder; |
| 9 | 9 | use Symfony\Bundle\MakerBundle\Generator; |
| 10 | 10 | use Symfony\Bundle\MakerBundle\InputConfiguration; |
| 11 | -use Symfony\Component\Console\Command\Command; |
|
| 12 | 11 | use Symfony\Component\Console\Command\Command as BaseCommand; |
| 13 | 12 | use Symfony\Component\Console\Input\InputInterface; |
| 14 | 13 | use Symfony\Component\Console\Input\InputOption; |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | $question->setValidator(['Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateBundleName']); |
| 150 | 150 | $question->setNormalizer( |
| 151 | - function ($value) { |
|
| 151 | + function($value) { |
|
| 152 | 152 | return $value ? trim($value) : ''; |
| 153 | 153 | } |
| 154 | 154 | ); |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $input->getOption('entity_name') |
| 172 | 172 | ); |
| 173 | 173 | $question->setValidator( |
| 174 | - function ($answer) { |
|
| 174 | + function($answer) { |
|
| 175 | 175 | // Should only contain letters. |
| 176 | 176 | $valid = preg_match('/^[a-zA-Z]+$/', $answer); |
| 177 | 177 | if (!$valid) { |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | } |
| 185 | 185 | ); |
| 186 | 186 | $question->setNormalizer( |
| 187 | - function ($value) { |
|
| 187 | + function($value) { |
|
| 188 | 188 | return $value ? trim($value) : ''; |
| 189 | 189 | } |
| 190 | 190 | ); |
@@ -264,12 +264,12 @@ discard block |
||
| 264 | 264 | ), 'yes' |
| 265 | 265 | ); |
| 266 | 266 | $question->setNormalizer( |
| 267 | - function ($value) { |
|
| 267 | + function($value) { |
|
| 268 | 268 | return $value[0] == 'y' ? 'y' : 'n'; |
| 269 | 269 | } |
| 270 | 270 | ); |
| 271 | 271 | $question->setValidator( |
| 272 | - function ($answer) { |
|
| 272 | + function($answer) { |
|
| 273 | 273 | // Should only contain letters. |
| 274 | 274 | $allowed = [ |
| 275 | 275 | 'y', |