Completed
Push — develop ( ea714c...693449 )
by Jaap
9s
created
src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use phpDocumentor\Reflection\Fqsen;
17 17
 use PhpParser\Node;
18 18
 use PhpParser\Node\Const_;
19
-use PhpParser\Node\Name;
20 19
 use PhpParser\Node\Stmt\Class_;
21 20
 use PhpParser\Node\Stmt\ClassConst;
22 21
 use PhpParser\Node\Stmt\ClassMethod;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     {
76 76
         switch (get_class($node)) {
77 77
             case Namespace_::class:
78
-                $this->resetState('\\' . $node->name . '\\');
78
+                $this->resetState('\\'.$node->name.'\\');
79 79
                 $node->fqsen = new Fqsen($this->buildName());
80 80
                 break;
81 81
             case Class_::class:
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
                 $node->fqsen = new Fqsen($this->buildName());
86 86
                 break;
87 87
             case Function_::class:
88
-                $this->parts->push($node->name . '()');
88
+                $this->parts->push($node->name.'()');
89 89
                 $node->fqsen = new Fqsen($this->buildName());
90 90
                 break;
91 91
             case ClassMethod::class:
92
-                $this->parts->push('::' . $node->name . '()');
92
+                $this->parts->push('::'.$node->name.'()');
93 93
                 $node->fqsen = new Fqsen($this->buildName());
94 94
                 break;
95 95
             case ClassConst::class:
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                 $node->fqsen = new Fqsen($this->buildName());
101 101
                 break;
102 102
             case PropertyProperty::class:
103
-                $this->parts->push('::$' . $node->name);
103
+                $this->parts->push('::$'.$node->name);
104 104
                 $node->fqsen = new Fqsen($this->buildName());
105 105
                 break;
106 106
         }
Please login to merge, or discard this patch.
src/phpDocumentor/Reflection/Php/Class_.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
     /**
98 98
      * Returns the superclass this class is extending if available.
99 99
      *
100
-     * @return NUll|Fqsen
100
+     * @return Class_
101 101
      */
102 102
     public function getParent()
103 103
     {
Please login to merge, or discard this patch.
src/phpDocumentor/Reflection/Php/ProjectFactory.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
      * Gets Namespace from the project if it exists, otherwise returns a new namepace
104 104
      *
105 105
      * @param Project $project
106
-     * @param $name
106
+     * @param string $name
107 107
      * @return Namespace_
108 108
      */
109 109
     private function getNamespaceByName(Project $project, $name)
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -128,31 +128,31 @@
 block discarded – undo
128 128
     private function buildNamespace(File $file, Namespace_ $namespace)
129 129
     {
130 130
         foreach ($file->getClasses() as $class) {
131
-            if ($namespace->getFqsen() . '\\' . $class->getName() == $class->getFqsen()) {
131
+            if ($namespace->getFqsen().'\\'.$class->getName() == $class->getFqsen()) {
132 132
                 $namespace->addClass($class->getFqsen());
133 133
             }
134 134
         }
135 135
 
136 136
         foreach ($file->getInterfaces() as $interface) {
137
-            if ($namespace->getFqsen() . '\\' . $interface->getName() == $interface->getFqsen()) {
137
+            if ($namespace->getFqsen().'\\'.$interface->getName() == $interface->getFqsen()) {
138 138
                 $namespace->addInterface($interface->getFqsen());
139 139
             }
140 140
         }
141 141
 
142 142
         foreach ($file->getFunctions() as $function) {
143
-            if ($namespace->getFqsen() . '\\' . $function->getName() . '()' == $function->getFqsen()) {
143
+            if ($namespace->getFqsen().'\\'.$function->getName().'()' == $function->getFqsen()) {
144 144
                 $namespace->addFunction($function->getFqsen());
145 145
             }
146 146
         }
147 147
 
148 148
         foreach ($file->getConstants() as $constant) {
149
-            if ($namespace->getFqsen() . '::' . $constant->getName() == $constant->getFqsen()) {
149
+            if ($namespace->getFqsen().'::'.$constant->getName() == $constant->getFqsen()) {
150 150
                 $namespace->addConstant($constant->getFqsen());
151 151
             }
152 152
         }
153 153
 
154 154
         foreach ($file->getTraits() as $trait) {
155
-            if ($namespace->getFqsen() . '\\' . $trait->getName() == $trait->getFqsen()) {
155
+            if ($namespace->getFqsen().'\\'.$trait->getName() == $trait->getFqsen()) {
156 156
                 $namespace->addTrait($trait->getFqsen());
157 157
             }
158 158
         }
Please login to merge, or discard this patch.
tests/example.file.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,6 @@
 block discarded – undo
99 99
         /**
100 100
          * Calculates the price for this specific component.
101 101
          *
102
-         * @param float[] $...additionalPrices Additional costs may be passed
103 102
          *
104 103
          * @return float
105 104
          */
Please login to merge, or discard this patch.
tests/unit/phpDocumentor/Reflection/Php/Factory/Interface_Test.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use Mockery as m;
17 17
 use phpDocumentor\Reflection\Fqsen;
18 18
 use phpDocumentor\Reflection\Php\StrategyContainer;
19
-use phpDocumentor\Reflection\Types\Context;
20 19
 use PhpParser\Comment\Doc;
21 20
 use PhpParser\Node\Const_;
22 21
 use PhpParser\Node\Expr\Variable;
Please login to merge, or discard this patch.
tests/unit/phpDocumentor/Reflection/Php/Factory/PropertyTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
18 18
 use Mockery as m;
19 19
 use phpDocumentor\Reflection\Php\StrategyContainer;
20 20
 use phpDocumentor\Reflection\PrettyPrinter;
21
-use phpDocumentor\Reflection\Types\Context;
22 21
 use PhpParser\Comment\Doc;
23 22
 use PhpParser\Node\Scalar\String_;
24 23
 use PhpParser\Node\Stmt\Class_ as ClassNode;
Please login to merge, or discard this patch.
tests/unit/phpDocumentor/Reflection/Php/Factory/Trait_Test.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 use Mockery as m;
17 17
 use phpDocumentor\Reflection\Fqsen;
18 18
 use phpDocumentor\Reflection\Php\StrategyContainer;
19
-use phpDocumentor\Reflection\Types\Context;
20 19
 use PhpParser\Comment\Doc;
21 20
 use PhpParser\Node\Name;
22 21
 use PhpParser\Node\Stmt\ClassMethod;
Please login to merge, or discard this patch.
example.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-     * Create a project map (similar to a sitemap) of project.
4
-     *
5
-     * The Reflection component is capable of analyzing one or more files into a hierarchy of objects representing the
6
-     * structure of your project. It does this by analyzing the source code of each individual file using the
7
-     * `analyze()` method in the Analyzer class.
8
-     *
9
-     * Because the Analyzer class requires a whole series of objects that interact together a factory method `create()`
10
-     * is available. This method instantiates all objects and provides a reasonable default to start using the Analyzer.
11
-     *
12
-     * There is also a Service Provider (`\phpDocumentor\Descriptor\ServiceProvider`) that can be used with either Silex
13
-     * or Cilex instead of using the factory method; this will make it easier to plug in your own features if you want to.
14
-     */
3
+ * Create a project map (similar to a sitemap) of project.
4
+ *
5
+ * The Reflection component is capable of analyzing one or more files into a hierarchy of objects representing the
6
+ * structure of your project. It does this by analyzing the source code of each individual file using the
7
+ * `analyze()` method in the Analyzer class.
8
+ *
9
+ * Because the Analyzer class requires a whole series of objects that interact together a factory method `create()`
10
+ * is available. This method instantiates all objects and provides a reasonable default to start using the Analyzer.
11
+ *
12
+ * There is also a Service Provider (`\phpDocumentor\Descriptor\ServiceProvider`) that can be used with either Silex
13
+ * or Cilex instead of using the factory method; this will make it easier to plug in your own features if you want to.
14
+ */
15 15
 
16 16
 // use Composer's autoloader to allow the application to automatically load all classes on request.
17 17
 use phpDocumentor\Reflection\Php\Project;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@
 block discarded – undo
22 22
 $projectFactory = \phpDocumentor\Reflection\Php\ProjectFactory::createInstance();
23 23
 
24 24
 // Create an array of files to analize.
25
-$files = [ new \phpDocumentor\Reflection\File\LocalFile('tests/example.file.php') ];
25
+$files = [new \phpDocumentor\Reflection\File\LocalFile('tests/example.file.php')];
26 26
 
27 27
 //create a new project 'MyProject' containing all elements in the files.
28 28
 /** @var Project $project */
29 29
 $project = $projectFactory->create('MyProject', $files);
30 30
 
31 31
 // As an example of what you can do, let's list all class names in the file 'tests/example.file.php'.
32
-echo 'List all classes in the example source file: ' . PHP_EOL;
32
+echo 'List all classes in the example source file: '.PHP_EOL;
33 33
 
34 34
 /** @var \phpDocumentor\Reflection\Php\Class_ $class */
35 35
 foreach ($project->getFiles()['tests/example.file.php']->getClasses() as $class) {
36
-    echo '- ' . $class->getFqsen() . PHP_EOL;
36
+    echo '- '.$class->getFqsen().PHP_EOL;
37 37
 }
Please login to merge, or discard this patch.
src/phpDocumentor/Reflection/Php/NodesFactory.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 namespace phpDocumentor\Reflection\Php;
15 15
 
16 16
 use phpDocumentor\Reflection\NodeVisitor\ElementNameResolver;
17
-use PhpParser\Lexer;
18 17
 use PhpParser\NodeTraverser;
19 18
 use PhpParser\NodeVisitor\NameResolver;
20 19
 use PhpParser\Parser;
Please login to merge, or discard this patch.