Ver código fonte

Fix whitespaces and add strict return code checking

Matthias Pigulla 13 anos atrás
pai
commit
ebbc807de0

+ 1 - 1
src/Composer/Repository/ComposerRepository.php

@@ -27,7 +27,7 @@ class ComposerRepository extends ArrayRepository
     public function __construct(array $config)
     {
         if (!preg_match('{^\w+://}', $config['url'])) {
-                  // assume http as the default protocol
+            // assume http as the default protocol
             $config['url'] = 'http://'.$config['url'];
         }
         $config['url'] = rtrim($config['url'], '/');

+ 2 - 2
src/Composer/Repository/Vcs/HgDriver.php

@@ -175,12 +175,12 @@ class HgDriver implements VcsDriverInterface
         if (preg_match('#(^(?:https?|ssh)://(?:[^@]@)?bitbucket.org|https://(?:.*?)\.kilnhg.com)#i', $url)) {
             return true;
         }
-        
+
         if (!$deep) {
             return false;
         }
 
         exec(sprintf('hg identify %s', escapeshellarg($url)), $ignored, $exit);
-        return $exit == 0;
+        return $exit === 0;
     }
 }

+ 2 - 2
src/Composer/Repository/Vcs/SvnDriver.php

@@ -177,8 +177,8 @@ class SvnDriver implements VcsDriverInterface
         if (!$deep) {
             return false;
         }
-        
+
         exec(sprintf('svn info --non-interactive %s 2>/dev/null', escapeshellarg($url)), $ignored, $exit);
-        return $exit == 0;
+        return $exit === 0;
     }
 }