@@ -7,8 +7,7 @@ |
||
| 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 | } |
@@ -45,7 +45,7 @@ |
||
| 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 | } |
@@ -102,6 +102,10 @@ discard block |
||
| 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 |
||
| 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)) { |
@@ -2,10 +2,7 @@ |
||
| 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; |
@@ -69,7 +69,7 @@ discard block |
||
| 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 |
||
| 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); |
@@ -88,6 +88,10 @@ |
||
| 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) { |
@@ -4,7 +4,6 @@ |
||
| 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; |
@@ -4,7 +4,6 @@ |
||
| 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; |
@@ -35,7 +35,7 @@ |
||
| 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]) |
@@ -23,7 +23,7 @@ |
||
| 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() |