Failed Conditions
Pull Request — master (#38)
by Matthias
02:47
created
DefinedSymbolsLocator/LocateDefinedSymbolsFromExtensions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@
 block discarded – undo
16 16
     public function __invoke(array $extensionNames) : array
17 17
     {
18 18
         $definedSymbols = [];
19
-        foreach($extensionNames as $extensionName) {
20
-            try{
19
+        foreach ($extensionNames as $extensionName) {
20
+            try {
21 21
                 $extensionReflection = new \ReflectionExtension($extensionName);
22 22
                 $definedSymbols = array_merge(
23 23
                     $definedSymbols,
Please login to merge, or discard this patch.
src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
         /* @var $file \SplFileInfo */
27 27
         foreach ($files as $file) {
28
-            if (! preg_match($extensionMatcher, $file->getBasename())) {
28
+            if (!preg_match($extensionMatcher, $file->getBasename())) {
29 29
                 continue;
30 30
             }
31 31
 
Please login to merge, or discard this patch.
src/ComposerRequireChecker/Cli/Options.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
     public function __construct(array $options = [])
19 19
     {
20 20
         foreach ($options as $key => $option) {
21
-            $methodName = 'set'.$this->getCamelCase($key);
22
-            if(!method_exists($this, $methodName)) {
21
+            $methodName = 'set' . $this->getCamelCase($key);
22
+            if (!method_exists($this, $methodName)) {
23 23
                 throw new \InvalidArgumentException($key . ' is not a known option - there is no method ' . $methodName);
24 24
             }
25 25
             $this->$methodName($option);
Please login to merge, or discard this patch.
src/ComposerRequireChecker/DependencyGuesser/DependencyGuesser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     public function __invoke($symbolName) : \Generator
20 20
     {
21
-        foreach($this->guessers as $guesser) {
21
+        foreach ($this->guessers as $guesser) {
22 22
             yield from $guesser($symbolName);
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
NodeVisitor/DefinedSymbolCollectorFunctionalTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace ComposerRequireCheckerTest\NodeVisitor;
4 4
 
5 5
 use ComposerRequireChecker\NodeVisitor\DefinedSymbolCollector;
6
-use PhpParser\Node;
7 6
 use PhpParser\NodeTraverser;
8 7
 use PhpParser\NodeTraverserInterface;
9 8
 use PhpParser\NodeVisitor\NameResolver;
Please login to merge, or discard this patch.
NodeVisitor/UsedSymbolCollectorFunctionalTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace ComposerRequireCheckerTest\NodeVisitor;
4 4
 
5 5
 use ComposerRequireChecker\NodeVisitor\UsedSymbolCollector;
6
-use PhpParser\Node;
7 6
 use PhpParser\NodeTraverser;
8 7
 use PhpParser\NodeTraverserInterface;
9 8
 use PhpParser\NodeVisitor\NameResolver;
Please login to merge, or discard this patch.
test/ComposerRequireCheckerTest/DependencyGuesser/DependencyGuesserTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     public function testGuessExtJson()
22 22
     {
23
-        if(!extension_loaded('json')) {
23
+        if (!extension_loaded('json')) {
24 24
             $this->markTestSkipped('extension json is not available');
25 25
         }
26 26
         $result = $this->guesser->__invoke('json_decode');
Please login to merge, or discard this patch.
src/ComposerRequireChecker/FileLocator/LocateComposerPackageSourceFiles.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@
 block discarded – undo
29 29
     {
30 30
         $flattened = array_reduce(
31 31
             $sourceDirs,
32
-            function (array $sourceDirs, $sourceDir) {
32
+            function(array $sourceDirs, $sourceDir) {
33 33
                 return array_merge($sourceDirs, (array)$sourceDir);
34 34
             },
35 35
             []
36 36
         );
37 37
         return array_values(array_map(
38
-            function (string $sourceDir) use ($packageDir) {
38
+            function(string $sourceDir) use ($packageDir) {
39 39
                 return $this->normalizePath($packageDir . '/' . ltrim($sourceDir, '/'));
40 40
             },
41 41
             $flattened
Please login to merge, or discard this patch.
example/test.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
 
11 11
 // Please run "run-test.sh", and not this file directly.
12 12
 
13
-(function () {
13
+(function() {
14 14
     require_once  __DIR__ . '/../vendor/autoload.php';
15 15
 
16 16
     $whitelistSymbols = ['null', 'true', 'false', 'static', 'self', 'parent'];
17
-    $defaultExtensions = ["Core","standard"]; // "bcmath","calendar","ctype","date","filter","hash","iconv","json","mcrypt","SPL","pcre","Reflection","session","standard","mysqlnd","tokenizer","zip","zlib","libxml","dom","PDO","Phar","SimpleXML","xml","wddx","xmlreader","xmlwriter"];
17
+    $defaultExtensions = ["Core", "standard"]; // "bcmath","calendar","ctype","date","filter","hash","iconv","json","mcrypt","SPL","pcre","Reflection","session","standard","mysqlnd","tokenizer","zip","zlib","libxml","dom","PDO","Phar","SimpleXML","xml","wddx","xmlreader","xmlwriter"];
18 18
 
19 19
     $getPackageSourceFiles = new LocateComposerPackageSourceFiles();
20 20
 
@@ -41,5 +41,5 @@  discard block
 block discarded – undo
41 41
 
42 42
     var_dump(['unknown_symbols' => $unknownSymbols]);
43 43
 
44
-    exit((int) (bool) $unknownSymbols);
44
+    exit((int)(bool)$unknownSymbols);
45 45
 })();
Please login to merge, or discard this patch.