Test Failed
Push — renovate/phpdocumentor-reflect... ( 51c25b...da5368 )
by Francesco
13:28 queued 10:56
created
example/test-example.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@
 block discarded – undo
17 17
  *  You should have received a copy of the GNU Affero General Public License
18 18
  *  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
  */
20
-include __DIR__.'/../vendor/autoload.php';
20
+include __DIR__ . '/../vendor/autoload.php';
21 21
 
22 22
 use JuliusHaertl\PHPDocToRst\ApiDocBuilder;
23 23
 
24
-$src = [__DIR__.'/../src'];
25
-$dst = __DIR__.'/../tests/test-project-doc';
24
+$src = [__DIR__ . '/../src'];
25
+$dst = __DIR__ . '/../tests/test-project-doc';
26 26
 
27 27
 $apiDocBuilder = new ApiDocBuilder($src, $dst);
28 28
 $apiDocBuilder->setVerboseOutput(true);
Please login to merge, or discard this patch.
src/Extension/GithubLocationExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,15 +67,15 @@
 block discarded – undo
67 67
                 return;
68 68
             }
69 69
             $filePath = $builder->getFile()->getPath();
70
-            $filePath = preg_replace('/^'.preg_quote($this->basePath, '/').'/', '', $filePath);
70
+            $filePath = preg_replace('/^' . preg_quote($this->basePath, '/') . '/', '', $filePath);
71 71
             $lineNumber = $element->getLocation()->getLineNumber();
72 72
             $url = $this->getGithubLink($filePath, $lineNumber, $this->branch);
73
-            $builder->addFieldList('Source', '`'.$filePath.'#'.$lineNumber.' <'.$url.'>`_');
73
+            $builder->addFieldList('Source', '`' . $filePath . '#' . $lineNumber . ' <' . $url . '>`_');
74 74
         }
75 75
     }
76 76
 
77 77
     private function getGithubLink($file, $line = 1, $branch = 'master')
78 78
     {
79
-        return $this->githubRepo.'/blob/'.$branch.'/'.$file.'#L'.$line;
79
+        return $this->githubRepo . '/blob/' . $branch . '/' . $file . '#L' . $line;
80 80
     }
81 81
 }
Please login to merge, or discard this patch.
src/Extension/PublicOnlyExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         if ($element instanceof Method || $element instanceof Property) {
44 44
             /** @var Method|Property $class */
45 45
             $class = $element;
46
-            if ((string) $class->getVisibility() !== 'public') {
46
+            if ((string)$class->getVisibility() !== 'public') {
47 47
                 return false;
48 48
             }
49 49
         }
Please login to merge, or discard this patch.
src/Extension/AddFullElementNameExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             if ($element instanceof Class_) {
44 44
                 $modifiers = $element->isAbstract() ? 'abstract' : '';
45 45
                 $modifiers = $element->isFinal() ? ' final' : $modifiers;
46
-                $builder->addLine(':php:`'.$modifiers.' class '.RstBuilder::escape($builder->getElement()->getName()).' {}`');
46
+                $builder->addLine(':php:`' . $modifiers . ' class ' . RstBuilder::escape($builder->getElement()->getName()) . ' {}`');
47 47
                 $builder->addLine();
48 48
             }
49 49
         }
Please login to merge, or discard this patch.
src/Extension/NoPrivateExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         if ($element instanceof Method || $element instanceof Property) {
44 44
             /** @var Method|Property $class */
45 45
             $class = $element;
46
-            if ((string) $class->getVisibility() === 'private') {
46
+            if ((string)$class->getVisibility() === 'private') {
47 47
                 return false;
48 48
             }
49 49
         }
Please login to merge, or discard this patch.
src/Extension/InterfaceImplementors.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
         foreach ($this->project->getFiles() as $file) {
39 39
             foreach ($file->getClasses() as $class) {
40 40
                 foreach ($class->getInterfaces() as $interface) {
41
-                    if (!array_key_exists((string) $interface, $this->implementors)) {
42
-                        $this->implementors[(string) $interface] = [];
41
+                    if (!array_key_exists((string)$interface, $this->implementors)) {
42
+                        $this->implementors[(string)$interface] = [];
43 43
                     }
44
-                    $this->implementors[(string) $interface][] = $class->getFqsen();
44
+                    $this->implementors[(string)$interface][] = $class->getFqsen();
45 45
                 }
46 46
             }
47 47
         }
@@ -61,15 +61,15 @@  discard block
 block discarded – undo
61 61
             /** @var Interface_ $interface */
62 62
             $interface = $builder->getElement();
63 63
             $content = '';
64
-            if (!array_key_exists((string) $interface->getFqsen(), $this->implementors)) {
64
+            if (!array_key_exists((string)$interface->getFqsen(), $this->implementors)) {
65 65
                 return;
66 66
             }
67
-            $implementors = $this->implementors[(string) $interface->getFqsen()];
67
+            $implementors = $this->implementors[(string)$interface->getFqsen()];
68 68
             if (count($implementors) === 0) {
69 69
                 return;
70 70
             }
71 71
             foreach ($implementors as $implementor) {
72
-                $content .= ':php:class:`'.RstBuilder::escape(substr($implementor, 1)).'` ';
72
+                $content .= ':php:class:`' . RstBuilder::escape(substr($implementor, 1)) . '` ';
73 73
             }
74 74
             $builder->addFieldList('Implemented by', $content);
75 75
             $builder->addLine();
Please login to merge, or discard this patch.
src/Extension/TocExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,16 +54,16 @@
 block discarded – undo
54 54
                         /** @var Argument $argument */
55 55
                         foreach ($method->getArguments() as $argument) {
56 56
                             // TODO: defaults, types
57
-                            $args .= '$'.$argument->getName().', ';
57
+                            $args .= '$' . $argument->getName() . ', ';
58 58
                         }
59 59
                         $args = substr($args, 0, -2);
60 60
                         $modifiers = $method->getVisibility();
61 61
                         $modifiers .= $method->isAbstract() ? ' abstract' : '';
62 62
                         $modifiers .= $method->isFinal() ? ' final' : '';
63 63
                         $modifiers .= $method->isStatic() ? ' static' : '';
64
-                        $signature = $modifiers.' '.$method->getName().'('.$args.')';
64
+                        $signature = $modifiers . ' ' . $method->getName() . '(' . $args . ')';
65 65
 
66
-                        $builder->addLine('* '.PhpDomainBuilder::getLink('meth', $method->getFqsen(), $signature));
66
+                        $builder->addLine('* ' . PhpDomainBuilder::getLink('meth', $method->getFqsen(), $signature));
67 67
                     }
68 68
                     $builder->addLine()->addLine();
69 69
                 }
Please login to merge, or discard this patch.
src/Builder/RstBuilder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 class RstBuilder
27 27
 {
28 28
     /** @var string */
29
-    protected $content = '.. rst-class:: phpdoctorst'.PHP_EOL.PHP_EOL;
29
+    protected $content = '.. rst-class:: phpdoctorst' . PHP_EOL . PHP_EOL;
30 30
     private $indentLevel = 0;
31 31
 
32 32
     public function getContent()
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function addFieldList($key, $value)
38 38
     {
39
-        $this->addLine(':'.self::escape($key).':');
39
+        $this->addLine(':' . self::escape($key) . ':');
40 40
         $this->indent()->addMultiline($value, false)->unindent();
41 41
 
42 42
         return $this;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function addLine($text = '')
46 46
     {
47
-        $this->add(str_repeat("\t", $this->indentLevel).$text.PHP_EOL);
47
+        $this->add(str_repeat("\t", $this->indentLevel) . $text . PHP_EOL);
48 48
 
49 49
         return $this;
50 50
     }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     public function addH1(string $text)
105 105
     {
106 106
         $this->addLine($text);
107
-        $this->addLine(str_repeat('=', strlen((string) $text)))->addLine();
107
+        $this->addLine(str_repeat('=', strlen((string)$text)))->addLine();
108 108
 
109 109
         return $this;
110 110
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function addH2($text)
113 113
     {
114 114
         $this->addLine($text);
115
-        $this->addLine(str_repeat('-', strlen((string) $text)))->addLine();
115
+        $this->addLine(str_repeat('-', strlen((string)$text)))->addLine();
116 116
 
117 117
         return $this;
118 118
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     public function addH3($text)
121 121
     {
122 122
         $this->addLine($text);
123
-        $this->addLine(str_repeat('~', strlen((string) $text)))->addLine();
123
+        $this->addLine(str_repeat('~', strlen((string)$text)))->addLine();
124 124
 
125 125
         return $this;
126 126
     }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $lines = preg_split('/$\R?^/m', $text);
131 131
         foreach ($lines as $line) {
132
-            $this->addLine('| '.$line);
132
+            $this->addLine('| ' . $line);
133 133
         }
134 134
 
135 135
         return $this;
Please login to merge, or discard this patch.
src/Builder/MainIndexBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@
 block discarded – undo
44 44
         $this->indent();
45 45
         $this->addLine(':maxdepth: 1')->addLine();
46 46
         foreach ($this->namespaces as $namespace) {
47
-            $namespaceString = (string) $namespace->getFqsen();
47
+            $namespaceString = (string)$namespace->getFqsen();
48 48
             $subPath = $namespaceString;
49
-            $path = substr(str_replace('\\', '/', $subPath), 1).'/index';
49
+            $path = substr(str_replace('\\', '/', $subPath), 1) . '/index';
50 50
             if ($namespaceString === '\\') {
51 51
                 $path = 'index';
52 52
             }
53
-            $this->addLine($namespace->getFqsen().' <'.$path.'>');
53
+            $this->addLine($namespace->getFqsen() . ' <' . $path . '>');
54 54
         }
55 55
         $this->addLine();
56 56
         $this->addLine();
Please login to merge, or discard this patch.