Completed
Pull Request — master (#53)
by
unknown
02:55
created
src/Padawan/Domain/Project/FQCN.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
7 7
     public function __get($key) {
8 8
         if ($key === "className") {
9 9
             return $this->getClassName();
10
-        }
11
-        elseif ($key === "namespace") {
10
+        } elseif ($key === "namespace") {
12 11
             return $this->getNamespace();
13 12
         }
14 13
     }
Please login to merge, or discard this patch.
src/Padawan/Domain/Project/Node/ClassProperty.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     /**
46 46
      * @param integer $modifier
47 47
      */
48
-    public function setModifier($modifier){
48
+    public function setModifier($modifier) {
49 49
         $this->modifier = $modifier;
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
src/Padawan/Framework/Generator/IndexGenerator.php 3 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -102,6 +102,10 @@  discard block
 block discarded – undo
102 102
             );
103 103
         }
104 104
     }
105
+
106
+    /**
107
+     * @param string $content
108
+     */
105 109
     public function createScopeForFile(File $file, $content, Index $index, $rewrite = true)
106 110
     {
107 111
         $startParser = microtime(1);
@@ -114,6 +118,10 @@  discard block
 block discarded – undo
114 118
         $this->getLogger()->info("Parsing: [$end]s");
115 119
         return $scope;
116 120
     }
121
+
122
+    /**
123
+     * @param string $hash
124
+     */
117 125
     public function processFileScope(File $file, Index $index, FileScope $scope = null, $hash = null)
118 126
     {
119 127
         if (empty($scope)) {
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,10 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Padawan\Framework\Generator;
4 4
 
5
-use Padawan\Domain\Project\Node\ClassData;
6
-use Padawan\Domain\Project\Node\InterfaceData;
7 5
 use Padawan\Domain\Event\IndexGenerationEvent;
8
-use Padawan\Framework\Domain\Project\InMemoryIndex;
9 6
 use Padawan\Domain\Project;
10 7
 use Padawan\Domain\Project\File;
11 8
 use Padawan\Domain\Project\Index;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 $end = microtime(1) - $start;
70 70
 
71 71
                 $this->getLogger()->debug("Indexing: [$end]s");
72
-                $this->getLogger()->debug("Memory: " . memory_get_usage());
72
+                $this->getLogger()->debug("Memory: ".memory_get_usage());
73 73
                 $globalTime += $end;
74 74
                 ++$done;
75 75
                 $process = floor($done / $all * 100);
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
         $this->getLogger()->debug(sprintf("Processing %s interfaces", count($scope->getInterfaces())));
131 131
         $this->getLogger()->debug(sprintf("Processing %s functions", count($scope->getFunctions())));
132 132
         foreach ($scope->getClasses() as $classData) {
133
-            $this->getLogger()->debug('Processing node ' . $classData->fqcn->toString());
133
+            $this->getLogger()->debug('Processing node '.$classData->fqcn->toString());
134 134
         }
135 135
         foreach ($scope->getInterfaces() as $interfaceData) {
136
-            $this->getLogger()->debug('Processing node ' . $interfaceData->fqcn->toString());
136
+            $this->getLogger()->debug('Processing node '.$interfaceData->fqcn->toString());
137 137
         }
138 138
         foreach ($scope->getFunctions() as $functionData) {
139
-            $this->getLogger()->debug('Processing node ' . $functionData->name);
139
+            $this->getLogger()->debug('Processing node '.$functionData->name);
140 140
         }
141 141
         $file->updateScope($scope, $hash);
142 142
         $index->addFile($file);
Please login to merge, or discard this patch.
src/Padawan/Parser/Parser.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -88,6 +88,10 @@
 block discarded – undo
88 88
         }
89 89
         return $nodes;
90 90
     }
91
+
92
+    /**
93
+     * @param \Padawan\Domain\Project\Index $index
94
+     */
91 95
     public function setIndex($index)
92 96
     {
93 97
         foreach ($this->walkers as $walker) {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Padawan\Domain\Project\FQN;
6 6
 use Padawan\Domain\Project\Node\Uses;
7
-use Padawan\Framework\Utils\PathResolver;
8 7
 use PhpParser\ParserFactory;
9 8
 use PhpParser\NodeTraverser as Traverser;
10 9
 use Psr\Log\LoggerInterface;
Please login to merge, or discard this patch.
src/Padawan/Command/ListCommand.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Padawan\Domain\Project;
6 6
 use Padawan\Domain\ProjectRepository;
7
-use Padawan\Domain\Project\Node\ClassData;
8 7
 use Symfony\Component\Console\Input\InputArgument;
9 8
 use Symfony\Component\Console\Input\InputInterface;
10 9
 use Padawan\Framework\Application\Socket\HttpOutput;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         /** @var Project */
36 36
         $project = $projectRepository->findByPath($path);
37 37
         $classesList = [];
38
-        $dto = function ($class) use ($path, $pathResolver) {
38
+        $dto = function($class) use ($path, $pathResolver) {
39 39
             return [
40 40
                 'fqcn' => $class->fqcn->toString(),
41 41
                 'filepath' => $pathResolver->join([$path, $class->file])
Please login to merge, or discard this patch.
src/Padawan/Framework/Application/Socket/HttpOutput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     public function writeln($message, $options = 0)
25 25
     {
26
-        return $this->client->write($message . "\n");
26
+        return $this->client->write($message."\n");
27 27
     }
28 28
 
29 29
     public function disconnect()
Please login to merge, or discard this patch.