Jordi Boggiano 10 years ago
parent
commit
0b4a9235f4

+ 1 - 1
src/Composer/Autoload/AutoloadGenerator.php

@@ -383,7 +383,7 @@ EOF;
         }
 
         if (!$filesCode) {
-            return FALSE;
+            return false;
         }
 
         return <<<EOF

+ 0 - 3
src/Composer/Installer.php

@@ -33,7 +33,6 @@ use Composer\Json\JsonFile;
 use Composer\Package\AliasPackage;
 use Composer\Package\CompletePackage;
 use Composer\Package\Link;
-use Composer\Package\LinkConstraint\EmptyConstraint;
 use Composer\Package\LinkConstraint\VersionConstraint;
 use Composer\Package\Locker;
 use Composer\Package\PackageInterface;
@@ -1179,7 +1178,6 @@ class Installer
         return $this;
     }
 
-
     /**
      * set whether to run autoloader or not
      *
@@ -1193,7 +1191,6 @@ class Installer
         return $this;
     }
 
-
     /**
      * set whether to run scripts or not
      *

+ 1 - 1
src/Composer/Package/Loader/ArrayLoader.php

@@ -249,7 +249,7 @@ class ArrayLoader implements LoaderInterface
             }
 
             // If using numeric aliases ensure the alias is a valid subversion
-            if(($sourcePrefix = $this->versionParser->parseNumericAliasPrefix($sourceBranch))
+            if (($sourcePrefix = $this->versionParser->parseNumericAliasPrefix($sourceBranch))
                 && ($targetPrefix = $this->versionParser->parseNumericAliasPrefix($targetBranch))
                 && (stripos($targetPrefix, $sourcePrefix) !== 0)
             ) {

+ 2 - 2
src/Composer/Package/Loader/RootPackageLoader.php

@@ -279,13 +279,13 @@ class RootPackageLoader extends ArrayLoader
             $length = PHP_INT_MAX;
 
             $nonFeatureBranches = '';
-            if(!empty($config['non-feature-branches'])) {
+            if (!empty($config['non-feature-branches'])) {
                 $nonFeatureBranches = implode('|', $config['non-feature-branches']);
             }
 
             foreach ($branches as $candidate) {
                 // return directly, if branch is configured to be non-feature branch
-                if($candidate === $branch && preg_match('{^(' . $nonFeatureBranches . ')$}', $candidate)) {
+                if ($candidate === $branch && preg_match('{^(' . $nonFeatureBranches . ')$}', $candidate)) {
                     return $version;
                 }
 

+ 1 - 1
src/Composer/Package/Loader/ValidatingArrayLoader.php

@@ -256,7 +256,7 @@ class ValidatingArrayLoader implements LoaderInterface
                     }
 
                     // If using numeric aliases ensure the alias is a valid subversion
-                    if(($sourcePrefix = $this->versionParser->parseNumericAliasPrefix($sourceBranch))
+                    if (($sourcePrefix = $this->versionParser->parseNumericAliasPrefix($sourceBranch))
                         && ($targetPrefix = $this->versionParser->parseNumericAliasPrefix($targetBranch))
                         && (stripos($targetPrefix, $sourcePrefix) !== 0)
                     ) {

+ 1 - 1
src/Composer/Repository/Vcs/GitDriver.php

@@ -242,7 +242,7 @@ class GitDriver extends VcsDriver
         }
 
         $process = new ProcessExecutor($io);
-        if($process->execute('git ls-remote --heads ' . ProcessExecutor::escape($url), $output) === 0) {
+        if ($process->execute('git ls-remote --heads ' . ProcessExecutor::escape($url), $output) === 0) {
             return true;
         }
 

+ 1 - 0
tests/Composer/Test/Autoload/AutoloadGeneratorTest.php

@@ -106,6 +106,7 @@ class AutoloadGeneratorTest extends TestCase
                         $ret = $ret();
                     }
                 }
+
                 return $ret;
             }));
 

+ 2 - 1
tests/Composer/Test/IO/ConsoleIOTest.php

@@ -56,9 +56,10 @@ class ConsoleIOTest extends TestCase
         $outputMock->expects($this->once())
             ->method('write')
             ->with(
-                $this->callback(function($messages){
+                $this->callback(function ($messages) {
                     $result = preg_match("[(.*)/(.*) First line]", $messages[0]) > 0;
                     $result &= preg_match("[(.*)/(.*) Second line]", $messages[1]) > 0;
+
                     return $result;
                 }),
                 $this->equalTo(false)

+ 1 - 2
tests/Composer/Test/InstallerTest.php

@@ -330,8 +330,7 @@ class InstallerTest extends TestCase
         );
 
         $section = null;
-        foreach ($tokens as $i => $token)
-        {
+        foreach ($tokens as $i => $token) {
             if (null === $section && empty($token)) {
                 continue; // skip leading blank
             }

+ 0 - 1
tests/Composer/Test/Mock/FactoryMock.php

@@ -14,7 +14,6 @@ namespace Composer\Test\Mock;
 use Composer\Composer;
 use Composer\Config;
 use Composer\Factory;
-use Composer\Repository;
 use Composer\Repository\RepositoryManager;
 use Composer\Repository\WritableRepositoryInterface;
 use Composer\Installer;

+ 4 - 2
tests/Composer/Test/Package/Loader/RootPackageLoaderTest.php

@@ -169,9 +169,10 @@ class RootPackageLoaderTest extends \PHPUnit_Framework_TestCase
         $self = $this;
 
         /* Can do away with this mock object when https://github.com/sebastianbergmann/phpunit-mock-objects/issues/81 is fixed */
-        $processExecutor = new ProcessExecutorMock(function($command, &$output = null, $cwd = null) use ($self) {
+        $processExecutor = new ProcessExecutorMock(function ($command, &$output = null, $cwd = null) use ($self) {
             if (0 === strpos($command, 'git rev-list')) {
                 $output = "";
+
                 return 0;
             }
 
@@ -207,9 +208,10 @@ class RootPackageLoaderTest extends \PHPUnit_Framework_TestCase
         $self = $this;
 
         /* Can do away with this mock object when https://github.com/sebastianbergmann/phpunit-mock-objects/issues/81 is fixed */
-        $processExecutor = new ProcessExecutorMock(function($command, &$output = null, $cwd = null) use ($self) {
+        $processExecutor = new ProcessExecutorMock(function ($command, &$output = null, $cwd = null) use ($self) {
             if (0 === strpos($command, 'git rev-list')) {
                 $output = "";
+
                 return 0;
             }
 

+ 1 - 0
tests/Composer/Test/Util/GitHubTest.php

@@ -166,6 +166,7 @@ class GitHubTest extends \PHPUnit_Framework_TestCase
                             return true;
                         }
                     }
+
                     return false;
                 })
             )