Completed
Push — develop ( cb6ec7...66de6a )
by Jaap
01:50
created
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.
src/phpDocumentor/Reflection/Middleware/ChainFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                     )
34 34
                 );
35 35
             }
36
-            $lastCallable = function ($command) use ($middleware, $lastCallable) {
36
+            $lastCallable = function($command) use ($middleware, $lastCallable) {
37 37
                 return $middleware->execute($command, $lastCallable);
38 38
             };
39 39
         }
Please login to merge, or discard this patch.
src/phpDocumentor/Reflection/Php/Factory/File.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@  discard block
 block discarded – undo
13 13
 
14 14
 namespace phpDocumentor\Reflection\Php\Factory;
15 15
 
16
-use InvalidArgumentException;
17 16
 use phpDocumentor\Reflection\File as FileSystemFile;
18 17
 use phpDocumentor\Reflection\Fqsen;
19 18
 use phpDocumentor\Reflection\Middleware\ChainFactory;
@@ -26,14 +25,12 @@  discard block
 block discarded – undo
26 25
 use phpDocumentor\Reflection\Types\Context;
27 26
 use phpDocumentor\Reflection\Types\ContextFactory;
28 27
 use PhpParser\Comment\Doc;
29
-use PhpParser\Lexer;
30 28
 use PhpParser\Node;
31 29
 use PhpParser\Node\Stmt\Class_ as ClassNode;
32 30
 use PhpParser\Node\Stmt\Function_ as FunctionNode;
33 31
 use PhpParser\Node\Stmt\Interface_ as InterfaceNode;
34 32
 use PhpParser\Node\Stmt\Namespace_ as NamespaceNode;
35 33
 use PhpParser\Node\Stmt\Trait_ as TraitNode;
36
-use PhpParser\NodeAbstract;
37 34
 
38 35
 /**
39 36
  * Strategy to create File element from the provided filename.
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     {
57 57
         $this->nodesFactory = $nodesFactory;
58 58
 
59
-        $lastCallable = function ($command) {
59
+        $lastCallable = function($command) {
60 60
             return $this->createFile($command);
61 61
         };
62 62
 
Please login to merge, or discard this patch.
src/phpDocumentor/Reflection/Php/Factory/Function_.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-     * This file is part of phpDocumentor.
4
-     *
5
-     * For the full copyright and license information, please view the LICENSE
6
-     * file that was distributed with this source code.
7
-     *
8
-     * @copyright 2010-2015 Mike van Riel<[email protected]>
9
-     * @license   http://www.opensource.org/licenses/mit-license.php MIT
10
-     * @link      http://phpdoc.org
11
-     */
3
+ * This file is part of phpDocumentor.
4
+ *
5
+ * For the full copyright and license information, please view the LICENSE
6
+ * file that was distributed with this source code.
7
+ *
8
+ * @copyright 2010-2015 Mike van Riel<[email protected]>
9
+ * @license   http://www.opensource.org/licenses/mit-license.php MIT
10
+ * @link      http://phpdoc.org
11
+ */
12 12
 
13 13
 namespace phpDocumentor\Reflection\Php\Factory;
14 14
 
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -12,15 +12,12 @@
 block discarded – undo
12 12
 
13 13
 namespace phpDocumentor\Reflection\Php\Factory;
14 14
 
15
-use InvalidArgumentException;
16
-use phpDocumentor\Reflection\Fqsen;
17 15
 use phpDocumentor\Reflection\Location;
18 16
 use phpDocumentor\Reflection\Php\Factory;
19 17
 use phpDocumentor\Reflection\Php\Function_ as FunctionDescriptor;
20 18
 use phpDocumentor\Reflection\Php\ProjectFactoryStrategy;
21 19
 use phpDocumentor\Reflection\Php\StrategyContainer;
22 20
 use phpDocumentor\Reflection\Types\Context;
23
-use PhpParser\Comment\Doc;
24 21
 use PhpParser\Node\Stmt\Function_ as FunctionNode;
25 22
 
26 23
 /**
Please login to merge, or discard this patch.
src/phpDocumentor/Reflection/Php/Factory/Trait_.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
                         break;
74 74
                     case TraitUse::class:
75 75
                         foreach ($stmt->traits as $use) {
76
-                            $trait->addUsedTrait(new Fqsen('\\'. $use->toString()));
76
+                            $trait->addUsedTrait(new Fqsen('\\'.$use->toString()));
77 77
                         }
78 78
                         break;
79 79
                 }
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -12,16 +12,12 @@
 block discarded – undo
12 12
 
13 13
 namespace phpDocumentor\Reflection\Php\Factory;
14 14
 
15
-use InvalidArgumentException;
16
-use phpDocumentor\Reflection\Element;
17 15
 use phpDocumentor\Reflection\Fqsen;
18 16
 use phpDocumentor\Reflection\Location;
19 17
 use phpDocumentor\Reflection\Php\ProjectFactoryStrategy;
20 18
 use phpDocumentor\Reflection\Php\StrategyContainer;
21 19
 use phpDocumentor\Reflection\Php\Trait_ as TraitElement;
22 20
 use phpDocumentor\Reflection\Types\Context;
23
-use PhpParser\Comment\Doc;
24
-use PhpParser\Node;
25 21
 use PhpParser\Node\Stmt\ClassMethod;
26 22
 use PhpParser\Node\Stmt\Property as PropertyNode;
27 23
 use PhpParser\Node\Stmt\Trait_ as TraitNode;
Please login to merge, or discard this patch.
tests/component/ProjectCreationTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 
13 13
 namespace phpDocumentor\Reflection;
14 14
 
15
-use Mockery as m;
16 15
 use phpDocumentor\Reflection\DocBlock\Tags\Param;
17 16
 use phpDocumentor\Reflection\File\LocalFile;
18 17
 use phpDocumentor\Reflection\Php\ProjectFactory;
Please login to merge, or discard this patch.
tests/component/ProjectNamespaceTest.php 1 patch
Unused Use Statements   -12 removed lines patch added patch discarded remove patch
@@ -12,19 +12,7 @@
 block discarded – undo
12 12
 
13 13
 namespace phpDocumentor\Reflection;
14 14
 
15
-use Mockery as m;
16 15
 use phpDocumentor\Reflection\File\LocalFile;
17
-use phpDocumentor\Reflection\Php\Factory\Argument;
18
-use phpDocumentor\Reflection\Php\Factory\Class_;
19
-use phpDocumentor\Reflection\Php\Factory\Constant;
20
-use phpDocumentor\Reflection\Php\Factory\DocBlock as DocBlockStrategy;
21
-use phpDocumentor\Reflection\Php\Factory\File;
22
-use phpDocumentor\Reflection\Php\NodesFactory;
23
-use phpDocumentor\Reflection\Php\Factory\Function_;
24
-use phpDocumentor\Reflection\Php\Factory\Interface_;
25
-use phpDocumentor\Reflection\Php\Factory\Method;
26
-use phpDocumentor\Reflection\Php\Factory\Property;
27
-use phpDocumentor\Reflection\Php\Factory\Trait_;
28 16
 use phpDocumentor\Reflection\Php\ProjectFactory;
29 17
 
30 18
 /**
Please login to merge, or discard this patch.