Completed
Push — master ( bea60b...76c543 )
by Christian
08:18
created
src/Console/Application.php 2 patches
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@
 block discarded – undo
22 22
 
23 23
 use Composer\Command as ComposerCommand;
24 24
 use Composer\Command\ScriptAliasCommand;
25
+use Composer\Factory as ComposerFactory;
26
+use Composer\IO\ConsoleIO;
25 27
 use Composer\IO\IOInterface;
26 28
 use Psr\Log\LoggerInterface;
27 29
 use Symfony\Bundle\FrameworkBundle\Console\Shell;
28 30
 use Symfony\Component\Console\Application as SymfonyApplication;
29
-use Composer\IO\ConsoleIO;
30 31
 use Symfony\Component\Console\Command\Command;
32
+use Symfony\Component\Console\Formatter\OutputFormatter;
31 33
 use Symfony\Component\Console\Input\InputInterface;
32 34
 use Symfony\Component\Console\Input\InputOption;
33 35
 use Symfony\Component\Console\Output\BufferedOutput;
34
-use Symfony\Component\Console\Output\OutputInterface;
35 36
 use Symfony\Component\Console\Output\ConsoleOutput;
36
-use Symfony\Component\Console\Formatter\OutputFormatter;
37
-use Composer\Factory as ComposerFactory;
37
+use Symfony\Component\Console\Output\OutputInterface;
38 38
 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
39 39
 use Symfony\Component\HttpKernel\Bundle\Bundle;
40 40
 use Symfony\Component\HttpKernel\Kernel;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@
 block discarded – undo
250 250
         // Add non-standard scripts as own commands - keep this last to ensure we do not override internal commands.
251 251
         if ($file->has('scripts')) {
252 252
             foreach (array_keys($file->get('scripts')) as $script) {
253
-                if (!defined('Composer\Script\ScriptEvents::'.str_replace('-', '_', strtoupper($script)))) {
253
+                if (!defined('Composer\Script\ScriptEvents::' . str_replace('-', '_', strtoupper($script)))) {
254 254
                     if ($this->has($script)) {
255 255
                         $output->writeln(
256 256
                             sprintf(
Please login to merge, or discard this patch.
src/CoreBundle/Command/SelfUpdateCommand.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      *
282 282
      * @param string $newFilename   The new file name.
283 283
      *
284
-     * @param null   $backupTarget  The backup file name.
284
+     * @param string   $backupTarget  The backup file name.
285 285
      *
286 286
      * @return \UnexpectedValueException|\PharException|null
287 287
      *
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      *
330 330
      * @param string $rollbackDir The directory where the rollback files are contained within.
331 331
      *
332
-     * @return bool|string
332
+     * @return string|false
333 333
      */
334 334
     protected function getLastBackupVersion($rollbackDir)
335 335
     {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 block discarded – undo
21 21
 namespace Tenside\CoreBundle\Command;
22 22
 
23 23
 use Composer\Command\Command;
24
+use Composer\Downloader\FilesystemException;
24 25
 use Composer\Factory;
25 26
 use Composer\Util\Filesystem;
26 27
 use Composer\Util\RemoteFilesystem;
27
-use Composer\Downloader\FilesystemException;
28
+use Symfony\Component\Console\Input\InputArgument;
28 29
 use Symfony\Component\Console\Input\InputInterface;
29 30
 use Symfony\Component\Console\Input\InputOption;
30
-use Symfony\Component\Console\Input\InputArgument;
31 31
 use Symfony\Component\Console\Output\OutputInterface;
32 32
 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
33 33
 use Symfony\Component\DependencyInjection\ContainerAwareTrait;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             );
134 134
         }
135 135
         if (!is_writable($localFilename)) {
136
-            throw new FilesystemException('Self update failed: the "'.$localFilename.'" file could not be written');
136
+            throw new FilesystemException('Self update failed: the "' . $localFilename . '" file could not be written');
137 137
         }
138 138
 
139 139
         if ($input->getOption('rollback')) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             return 0;
158 158
         }
159 159
 
160
-        $tempFilename = $tmpDir . '/' . basename($localFilename, '.phar').'-temp.phar';
160
+        $tempFilename = $tmpDir . '/' . basename($localFilename, '.phar') . '-temp.phar';
161 161
         $backupFile   = sprintf(
162 162
             '%s/%s-%s%s',
163 163
             $rollbackDir,
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         }
184 184
 
185 185
         if ($err = $this->setLocalPhar($localFilename, $tempFilename, $backupFile)) {
186
-            $inputOutput->writeError('<error>The file is corrupted ('.$err->getMessage().').</error>');
186
+            $inputOutput->writeError('<error>The file is corrupted (' . $err->getMessage() . ').</error>');
187 187
             $inputOutput->writeError('<error>Please re-run the self-update command to try again.</error>');
188 188
 
189 189
             return 1;
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
         $old = $rollbackDir . '/' . $rollbackVersion . self::OLD_INSTALL_EXT;
250 250
 
251 251
         if (!is_file($old)) {
252
-            throw new FilesystemException('Composer rollback failed: "'.$old.'" could not be found');
252
+            throw new FilesystemException('Composer rollback failed: "' . $old . '" could not be found');
253 253
         }
254 254
         if (!is_readable($old)) {
255
-            throw new FilesystemException('Composer rollback failed: "'.$old.'" could not be read');
255
+            throw new FilesystemException('Composer rollback failed: "' . $old . '" could not be read');
256 256
         }
257 257
 
258 258
         $oldFile     = sprintf('%s/"%s"', $rollbackDir, $rollbackVersion, self::OLD_INSTALL_EXT);
Please login to merge, or discard this patch.
src/CoreBundle/Controller/PackageController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,6 @@
 block discarded – undo
29 29
 use Composer\Repository\RepositoryInterface;
30 30
 use Symfony\Component\HttpFoundation\JsonResponse;
31 31
 use Symfony\Component\HttpFoundation\Request;
32
-use Symfony\Component\HttpFoundation\Response;
33 32
 use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
34 33
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
35 34
 use Tenside\Composer\PackageConverter;
Please login to merge, or discard this patch.
src/CoreBundle/Controller/SearchPackageController.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
 use Composer\Repository\RepositoryInterface;
28 28
 use Symfony\Component\HttpFoundation\JsonResponse;
29 29
 use Symfony\Component\HttpFoundation\Request;
30
-use Tenside\Composer\Package\VersionedPackage;
31 30
 use Tenside\Composer\PackageConverter;
31
+use Tenside\Composer\Package\VersionedPackage;
32 32
 use Tenside\Composer\Search\CompositeSearch;
33 33
 use Tenside\Composer\Search\RepositorySearch;
34 34
 use Tenside\Util\JsonArray;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
         $filters = [];
89 89
         if ('contao' === $data->get('type')) {
90 90
             $filters[] =
91
-                function ($package) {
91
+                function($package) {
92 92
                     /** @var PackageInterface $package */
93 93
                     return in_array($package->getType(), ['contao-module', 'contao-bundle', 'legacy-contao-module']);
94 94
                 };
Please login to merge, or discard this patch.
src/CoreBundle/Security/JavascriptWebToken.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@
 block discarded – undo
49 49
      *
50 50
      * @param string                   $providerKey The provider key
51 51
      *
52
-     * @param string|object            $user        The user
52
+     * @param \Symfony\Component\Security\Core\User\UserInterface            $user        The user
53 53
      *
54
-     * @param RoleInterface[]|string[] $roles       An array of roles
54
+     * @param \Symfony\Component\Security\Core\Role\Role[] $roles       An array of roles
55 55
      *
56 56
      * @throws \InvalidArgumentException When the provider key is empty.
57 57
      */
Please login to merge, or discard this patch.
src/CoreBundle/Security/JWTAuthenticator.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      *
67 67
      * @param UserInformationInterface $userData The user data to issue a token for.
68 68
      *
69
-     * @param int|null                 $lifetime The lifetime in seconds this token shall be valid.
69
+     * @param integer                 $lifetime The lifetime in seconds this token shall be valid.
70 70
      *                                           Use null for no limit.
71 71
      *
72 72
      * @return string
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      *
188 188
      * @param string $jwt The jwt as string.
189 189
      *
190
-     * @return object
190
+     * @return string
191 191
      *
192 192
      * @throws \UnexpectedValueException When the token does not match the local id.
193 193
      */
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      *
211 211
      * @param null|array $customPayload Any custom payload to be added to the token.
212 212
      *
213
-     * @param int|null   $lifetime      The lifetime in seconds this token shall be valid. Use null for no limit.
213
+     * @param integer   $lifetime      The lifetime in seconds this token shall be valid. Use null for no limit.
214 214
      *
215 215
      * @return string
216 216
      */
Please login to merge, or discard this patch.
src/CoreBundle/Security/UserInformation.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
     /**
146 146
      * Get the granted access levels.
147 147
      *
148
-     * @return int
148
+     * @return string|null
149 149
      */
150 150
     public function getAccessLevel()
151 151
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
     public function getRoles()
76 76
     {
77 77
         $user       = $this;
78
-        $comparator = function ($level) use ($user) {
78
+        $comparator = function($level) use ($user) {
79 79
             return $user->hasAccessLevel($level);
80 80
         };
81 81
 
Please login to merge, or discard this patch.
src/Task/AbstractComposerCommandTask.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      *
75 75
      * @param Command $command The command to patch.
76 76
      *
77
-     * @return Command
77
+     * @return WrappedCommandTrait
78 78
      *
79 79
      * @throws \InvalidArgumentException When no setComposerFactory method is declared.
80 80
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
         /** @var WrappedCommandTrait $command */
88 88
         $command->setComposerFactory(
89
-            function () {
89
+            function() {
90 90
                 return Factory::create($this->getIO());
91 91
             }
92 92
         );
Please login to merge, or discard this patch.
src/Task/TaskList.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
      *
197 197
      * @param JsonArray $config The configuration of the task.
198 198
      *
199
-     * @return Task|null
199
+     * @return Task
200 200
      */
201 201
     private function createTaskFromMetaData(JsonArray $config)
202 202
     {
Please login to merge, or discard this patch.