Completed
Push — master ( b67c40...bfc3d3 )
by Matthias
02:33
created
src/ComposerRequireChecker/Cli/CheckCommand.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Created by PhpStorm.
4
- * User: matthias
5
- * Date: 28.11.15
6
- * Time: 16:16
7
- */
3
+     * Created by PhpStorm.
4
+     * User: matthias
5
+     * Date: 28.11.15
6
+     * Time: 16:16
7
+     */
8 8
 
9 9
 namespace ComposerRequireChecker\Cli;
10 10
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     protected function execute(InputInterface $input, OutputInterface $output) : int
50 50
     {
51 51
 
52
-        if(!$output->isQuiet()) {
52
+        if (!$output->isQuiet()) {
53 53
             $output->writeln($this->getApplication()->getLongVersion());
54 54
         }
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         $getPackageSourceFiles = new LocateComposerPackageSourceFiles();
60 60
 
61
-        $sourcesASTs  = new LocateASTFromFiles((new ParserFactory())->create(ParserFactory::PREFER_PHP7));
61
+        $sourcesASTs = new LocateASTFromFiles((new ParserFactory())->create(ParserFactory::PREFER_PHP7));
62 62
 
63 63
         $definedVendorSymbols = (new LocateDefinedSymbolsFromASTRoots())->__invoke($sourcesASTs(
64 64
             (new ComposeGenerators())->__invoke(
@@ -98,16 +98,16 @@  discard block
 block discarded – undo
98 98
     private function getCheckOptions(InputInterface $input) : Options
99 99
     {
100 100
         $fileName = $input->getOption('config-file');
101
-        if(!$fileName) {
101
+        if (!$fileName) {
102 102
             return new Options();
103 103
         }
104 104
 
105
-        if(!is_readable($fileName)) {
105
+        if (!is_readable($fileName)) {
106 106
             throw new \InvalidArgumentException('unable to read ' . $fileName);
107 107
         }
108 108
 
109 109
         $jsonData = json_decode(file_get_contents($fileName), true);
110
-        if(false === $jsonData) {
110
+        if (false === $jsonData) {
111 111
             throw new \Exception('error parsing the config file: ' . json_last_error_msg());
112 112
         }
113 113
 
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
      */
123 123
     private function checkJsonFile(\string $jsonFile)
124 124
     {
125
-        if(!is_readable($jsonFile)) {
125
+        if (!is_readable($jsonFile)) {
126 126
             throw new InvalidInputFileException('cannot read ' . $jsonFile);
127 127
         }
128 128
 
129
-        if(false == json_decode(file_get_contents($jsonFile))) {
129
+        if (false == json_decode(file_get_contents($jsonFile))) {
130 130
             throw new InvalidInputFileException('error parsing ' . $jsonFile . ': ' . json_last_error_msg());
131 131
         }
132 132
 
Please login to merge, or discard this patch.
src/ComposerRequireChecker/Cli/Application.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,22 +25,22 @@
 block discarded – undo
25 25
     {
26 26
         $version = null;
27 27
         $pharFile = \Phar::running();
28
-        if($pharFile) {
28
+        if ($pharFile) {
29 29
             $metadata = (new \Phar($pharFile))->getMetadata();
30
-            $version = $metadata['version'] ?? null;
30
+            $version = $metadata['version'] ? ? null;
31 31
         }
32 32
 
33
-        if(!$version) {
33
+        if (!$version) {
34 34
             $pwd = getcwd();
35 35
             chdir(realpath(__DIR__ . '/../../../'));
36 36
             $gitVersion = @exec('git describe --tags --dirty=-dev --always 2>&1', $output, $returnValue);
37 37
             chdir($pwd);
38
-            if($returnValue === 0) {
38
+            if ($returnValue === 0) {
39 39
                 $version = $gitVersion;
40 40
             }
41 41
         }
42 42
 
43
-        return $version ?? 'unknown-development';
43
+        return $version ? ? 'unknown-development';
44 44
     }
45 45
 
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.