Completed
Push — master ( 2faef5...2c882d )
by
unknown
29s
created
src/SumoCoders/FrameworkCoreBundle/BreadCrumb/BreadCrumbBuilder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
201 201
      * Find an item in the menu based on its URI
202 202
      *
203 203
      * @param MenuItem $menuItem
204
-     * @param          $uri
204
+     * @param          string $uri
205 205
      * @return MenuItem|null
206 206
      */
207 207
     private function findItemBasedOnUri(MenuItem $menuItem, $uri)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
 
169 169
             $home = new MenuItem('core.menu.home', $this->factory);
170 170
             $home->setLabel('core.menu.home');
171
-            $home->setUri('/' . $locale);
171
+            $home->setUri('/'.$locale);
172 172
             $this->items[] = $home;
173 173
 
174 174
             $this->items = array_merge($this->items, array_reverse($items));
Please login to merge, or discard this patch.
SumoCoders/FrameworkCoreBundle/Tests/BreadCrumb/BreadCrumbBuilderTest.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,8 @@
 block discarded – undo
29 29
     }
30 30
 
31 31
     /**
32
-     * @return \PHPUnit_Framework_MockObject_MockObject
32
+     * @param MenuItem|null $item
33
+     * @return \PHPUnit_Framework_MockObject_MockBuilder
33 34
      */
34 35
     protected function getFactory($item)
35 36
     {
Please login to merge, or discard this patch.
src/SumoCoders/FrameworkCoreBundle/Tests/Menu/MenuBuilderTest.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     }
46 46
 
47 47
     /**
48
-     * @return \PHPUnit_Framework_MockObject_MockObject
48
+     * @return \PHPUnit_Framework_MockObject_MockBuilder
49 49
      */
50 50
     protected function getFactory()
51 51
     {
Please login to merge, or discard this patch.
src/SumoCoders/FrameworkCoreBundle/Tests/Composer/ScriptHandlerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         $io->method('isDecorated')
18 18
             ->willReturn(true);
19 19
 
20
-        $this->expectOutputString('foo' . "\n");
20
+        $this->expectOutputString('foo'."\n");
21 21
         ScriptHandler::runCommandOnlyInDevMode('echo "foo"', $io, true);
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/SumoCoders/FrameworkCoreBundle/Tests/bootstrap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-call_user_func(function () {
4
-    if (! is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) {
3
+call_user_func(function() {
4
+    if (!is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) {
5 5
         throw new \LogicException('Could not find vendor/autoload.php. Did you forget to run "composer install --dev"?');
6 6
     }
7 7
 
Please login to merge, or discard this patch.
src/SumoCoders/FrameworkCoreBundle/Installer/Installer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public function getDecoratedMessage($message, $type = null, $isDecorated = true)
21 21
     {
22 22
         if ($isDecorated && $type !== null) {
23
-            $message = '<' . $type . '>' . $message . '</' . $type . '>';
23
+            $message = '<'.$type.'>'.$message.'</'.$type.'>';
24 24
         }
25 25
 
26 26
         return $message;
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function ask(IOInterface $io, $question, $default = null)
36 36
     {
37
-        $question = $this->getDecoratedMessage($question, 'question', $io->isDecorated()) . ' ';
37
+        $question = $this->getDecoratedMessage($question, 'question', $io->isDecorated()).' ';
38 38
         if ($default !== null) {
39
-            $question .= '(' . $this->getDecoratedMessage($default, 'comment', $io->isDecorated()) . ')';
39
+            $question .= '('.$this->getDecoratedMessage($default, 'comment', $io->isDecorated()).')';
40 40
         }
41 41
         $question .= ': ';
42 42
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function askConfirmation(IOInterface $io, $question, $default = true)
53 53
     {
54
-        $question = $this->getDecoratedMessage($question, 'question', $io->isDecorated()) . ' ';
54
+        $question = $this->getDecoratedMessage($question, 'question', $io->isDecorated()).' ';
55 55
         $question .= '(Y/n): ';
56 56
 
57 57
         return $io->askConfirmation($question, $default);
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
     protected function replaceSetRubyVar($variableName, $value, $content)
117 117
     {
118 118
         return preg_replace(
119
-            '/(set.*:' . $variableName . ',.*)\'.*\'/iU',
120
-            '$1\'' . $value . '\'',
119
+            '/(set.*:'.$variableName.',.*)\'.*\'/iU',
120
+            '$1\''.$value.'\'',
121 121
             $content
122 122
         );
123 123
     }
Please login to merge, or discard this patch.
src/SumoCoders/FrameworkCoreBundle/Composer/ScriptHandler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
         $io = $event->getIO();
20 20
 
21 21
         // check if parameters.yml exists
22
-        $rootDir = realpath(__DIR__ . '/../../../../');
23
-        if (file_exists($rootDir . '/app/config/parameters.yml')) {
22
+        $rootDir = realpath(__DIR__.'/../../../../');
23
+        if (file_exists($rootDir.'/app/config/parameters.yml')) {
24 24
             $io->write(
25 25
                 $installer->getDecoratedMessage(
26 26
                     'Skipping creating the initial config as parameters.yml already exists',
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             $config['client'] = $installer->ask($io, 'client name', $information['client']);
37 37
             $config['project'] = $installer->ask($io, 'project name', $information['project']);
38 38
 
39
-            $config['database_name'] = substr($config['client'], 0, 8) . '_' . substr($config['project'], 0, 7);
39
+            $config['database_name'] = substr($config['client'], 0, 8).'_'.substr($config['project'], 0, 7);
40 40
             $config['database_user'] = $config['database_name'];
41 41
 
42 42
             if ($information['is_local']) {
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 
51 51
             // create the database if requested
52 52
             if ($installer->askConfirmation($io, 'Should I create the database?')) {
53
-                passthru('mysqladmin create ' . $config['database_name']);
53
+                passthru('mysqladmin create '.$config['database_name']);
54 54
             }
55 55
 
56 56
             // alter the Capfile if requested
57
-            $capfilePath = $rootDir . '/Capfile';
57
+            $capfilePath = $rootDir.'/Capfile';
58 58
             if (file_exists($capfilePath)) {
59 59
                 if ($installer->askConfirmation($io, 'Should I alter the Capfile?')) {
60 60
                     $installer->updateCapfile($capfilePath, $config);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             }
63 63
 
64 64
             // alter the dist file if requested
65
-            $parameterYmlDistPath = $rootDir . '/app/config/parameters.yml.dist';
65
+            $parameterYmlDistPath = $rootDir.'/app/config/parameters.yml.dist';
66 66
             if (file_exists($parameterYmlDistPath)) {
67 67
                 if ($installer->askConfirmation($io, 'Should I alter parameters.yml.dist?')) {
68 68
                     $installer->updateYmlFile($parameterYmlDistPath, $config);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         // make our command look nice
116 116
         if ($io->isDecorated()) {
117
-            $formattedCommand = '<comment>' . $command . '</comment>';
117
+            $formattedCommand = '<comment>'.$command.'</comment>';
118 118
         } else {
119 119
             $formattedCommand = $command;
120 120
         }
Please login to merge, or discard this patch.
src/SumoCoders/FrameworkCoreBundle/ValueObject/AbstractFile.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function getAbsolutePath()
55 55
     {
56
-        return $this->fileName === null ? null : $this->getUploadRootDir() . '/' . $this->fileName;
56
+        return $this->fileName === null ? null : $this->getUploadRootDir().'/'.$this->fileName;
57 57
     }
58 58
 
59 59
     /**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $file = $this->getAbsolutePath();
65 65
         if (is_file($file) && file_exists($file)) {
66
-            return '/' . $this->getUploadDir() . '/' . $this->fileName;
66
+            return '/'.$this->getUploadDir().'/'.$this->fileName;
67 67
         }
68 68
 
69 69
         return '';
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     protected function getUploadRootDir()
76 76
     {
77 77
         // the absolute directory path where uploaded documents should be saved
78
-        return __DIR__ . '/../../../../web/' . $this->getTrimmedUploadDir();
78
+        return __DIR__.'/../../../../web/'.$this->getTrimmedUploadDir();
79 79
     }
80 80
 
81 81
     /**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
         // do whatever you want to generate a unique name
152 152
         $filename = sha1(uniqid(mt_rand(), true));
153
-        $this->fileName = $filename . '.' . $this->getFile()->guessExtension();
153
+        $this->fileName = $filename.'.'.$this->getFile()->guessExtension();
154 154
     }
155 155
 
156 156
     /**
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         // check if we have an old image
168 168
         if ($this->oldFileName !== null) {
169 169
             // delete the old image
170
-            $oldFile = $this->getUploadRootDir() . '/' . $this->oldFileName;
170
+            $oldFile = $this->getUploadRootDir().'/'.$this->oldFileName;
171 171
             if (is_file($oldFile) && file_exists($oldFile)) {
172 172
                 unlink($oldFile);
173 173
             }
Please login to merge, or discard this patch.
src/SumoCoders/FrameworkCoreBundle/Form/Type/ImageType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $builder
32 32
             ->addEventListener(
33 33
                 FormEvents::PRE_SET_DATA,
34
-                function (FormEvent $event) use ($options) {
34
+                function(FormEvent $event) use ($options) {
35 35
                     $event->getForm()->add(
36 36
                         'file',
37 37
                         SymfonyFileType::class,
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
             )
62 62
             ->addModelTransformer(
63 63
                 new CallbackTransformer(
64
-                    function (AbstractImage $image = null) {
64
+                    function(AbstractImage $image = null) {
65 65
                         return $image;
66 66
                     },
67
-                    function (AbstractImage $image = null) use ($options) {
67
+                    function(AbstractImage $image = null) use ($options) {
68 68
                         if ($image === null) {
69 69
                             $imageClass = $options['image_class'];
70 70
                             if ($this->removeField !== null && $this->removeField->getData()) {
Please login to merge, or discard this patch.