Passed
Push — master ( 5da770...682fcd )
by Julius
02:02
created
src/Extension/Extension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     /** @var Project */
33 33
     protected $project;
34 34
 
35
-    public function __construct(Project &$project) {
35
+    public function __construct(Project&$project) {
36 36
         $this->project = $project;
37 37
     }
38 38
 
Please login to merge, or discard this patch.
src/Builder/RstBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     private $indentLevel = 0;
37 37
     /** @var string */
38
-    protected $content = '.. rst-class:: phpdoctorst' . PHP_EOL . PHP_EOL ;
38
+    protected $content = '.. rst-class:: phpdoctorst' . PHP_EOL . PHP_EOL;
39 39
 
40 40
     public function getContent() {
41 41
         return $this->content;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     }
59 59
 
60 60
     public function addFieldList($key, $value) {
61
-        $this->addLine(':'.self::escape($key).':');
61
+        $this->addLine(':' . self::escape($key) . ':');
62 62
         $this->indent()->addMultiline($value, true)->unindent();
63 63
         return $this;
64 64
     }
Please login to merge, or discard this patch.
src/ApiDocBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@
 block discarded – undo
209 209
         $this->log('Build indexes.');
210 210
         $namespaces = $this->project->getNamespaces();
211 211
         $namespaces['\\'] = $this->project->getRootNamespace();
212
-        usort($namespaces, function (Namespace_ $a, Namespace_ $b) {
212
+        usort($namespaces, function(Namespace_ $a, Namespace_ $b) {
213 213
             return strcmp($a->getFqsen(), $b->getFqsen());
214 214
         });
215 215
         /** @var Namespace_ $namespace */
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
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
             return;
48 48
         }
49 49
         if ($type === PhpDomainBuilder::SECTION_BEFORE_DESCRIPTION) {
50
-            if($element instanceof Class_) {
50
+            if ($element instanceof Class_) {
51 51
                 $modifiers = $element->isAbstract() ? 'abstract' : '';
52 52
                 $modifiers = $element->isFinal() ? ' final' : $modifiers;
53 53
                 $builder->addLine(':php:`' . $modifiers . ' class ' . RstBuilder::escape($builder->getElement()->getName()) . ' {}`');
Please login to merge, or discard this patch.
src/GenerateDocumentationCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,10 +66,10 @@
 block discarded – undo
66 66
             $apiDocBuilder->setVerboseOutput(true);
67 67
             $apiDocBuilder->setDebugOutput(true);
68 68
         }
69
-        if($input->getOption('public-only')) {
69
+        if ($input->getOption('public-only')) {
70 70
             $apiDocBuilder->addExtension(PublicOnlyExtension::class);
71 71
         }
72
-        if($input->getOption('element-toc')) {
72
+        if ($input->getOption('element-toc')) {
73 73
             $apiDocBuilder->addExtension(TocExtension::class);
74 74
         }
75 75
         $apiDocBuilder->build();
Please login to merge, or discard this patch.
src/Builder/PhpDomainBuilder.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @return mixed
71 71
      */
72 72
     public static function getNamespace(Element $element) {
73
-        return substr($element->getFqsen(), 0, strlen($element->getFqsen())-strlen('\\'. $element->getName()));
73
+        return substr($element->getFqsen(), 0, strlen($element->getFqsen()) - strlen('\\' . $element->getName()));
74 74
         //return str_replace('\\' . $element->getName(), '', $element->getFqsen());
75 75
     }
76 76
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
                 $param = $params[$argument->getName()];
261 261
                 if ($param !== null) {
262 262
                     $typString = $param->getType();
263
-                    $this->addMultiline(':param '.self::escape($typString).' $' . $argument->getName() . ': ' . self::typesToRst($typString) . ' ' . $param->getDescription(), true);
263
+                    $this->addMultiline(':param ' . self::escape($typString) . ' $' . $argument->getName() . ': ' . self::typesToRst($typString) . ' ' . $param->getDescription(), true);
264 264
                 }
265 265
             }
266 266
             foreach ($docBlock->getTags() as $tag) {
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
      * @param $fqsen string
277 277
      * @return string
278 278
      */
279
-    public static function getLink($type, $fqsen, $description='') {
280
-        if($description !== '') {
279
+    public static function getLink($type, $fqsen, $description = '') {
280
+        if ($description !== '') {
281 281
             return ':php:' . $type . ':`' . RstBuilder::escape($description) . '<' . RstBuilder::escape(substr($fqsen, 1)) . '>`';
282 282
         }
283 283
         return ':php:' . $type . ':`' . RstBuilder::escape(substr($fqsen, 1)) . '`';
Please login to merge, or discard this patch.
Braces   +24 added lines, -9 removed lines patch added patch discarded remove patch
@@ -333,44 +333,58 @@  discard block
 block discarded – undo
333 333
         $tags = $docBlock->getTagsByName($tagName);
334 334
         switch ($tagName) {
335 335
             case 'return':
336
-                if (count($tags) === 0) continue;
336
+                if (count($tags) === 0) {
337
+                    continue;
338
+                }
337 339
                 /** @var Return_ $return */
338 340
                 $return = $tags[0];
339 341
                 $this->addMultiline(':Returns: ' . $return->getType() . ' ' . RstBuilder::escape($return->getDescription()), true);
340 342
                 break;
341 343
             case 'var':
342
-                if (count($tags) === 0) continue;
344
+                if (count($tags) === 0) {
345
+                    continue;
346
+                }
343 347
                 /** @var DocBlock\Tags\Var_ $return */
344 348
                 $return = $tags[0];
345 349
                 $this->addMultiline(':Type: ' . self::typesToRst($return->getType()) . ' ' . RstBuilder::escape($return->getDescription()), true);
346 350
                 break;
347 351
             case 'throws':
348
-                if (count($tags) === 0) continue;
352
+                if (count($tags) === 0) {
353
+                    continue;
354
+                }
349 355
                 /** @var Throws $tag */
350 356
                 foreach ($tags as $tag) {
351 357
                     $this->addMultiline(':Throws: ' . $tag->getType() . ' ' . RstBuilder::escape($tag->getDescription()), true);
352 358
                 }
353 359
                 break;
354 360
             case 'since':
355
-                if (count($tags) === 0) continue;
361
+                if (count($tags) === 0) {
362
+                    continue;
363
+                }
356 364
                 /** @var Since $return */
357 365
                 $return = $tags[0];
358 366
                 $this->addMultiline(':Since: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true);
359 367
                 break;
360 368
             case 'deprecated':
361
-                if (count($tags) === 0) continue;
369
+                if (count($tags) === 0) {
370
+                    continue;
371
+                }
362 372
                 /** @var Deprecated $return */
363 373
                 $return = $tags[0];
364 374
                 $this->addMultiline(':Deprecated: ' . $return->getVersion() . ' ' . RstBuilder::escape($return->getDescription()), true);
365 375
                 break;
366 376
             case 'see':
367
-                if (count($tags) === 0) continue;
377
+                if (count($tags) === 0) {
378
+                    continue;
379
+                }
368 380
                 /** @var See $return */
369 381
                 $return = $tags[0];
370 382
                 $this->addMultiline(':See: ' . $return->getReference() . ' ' . RstBuilder::escape($return->getDescription()), true);
371 383
                 break;
372 384
             case 'license':
373
-                if (count($tags) === 0) continue;
385
+                if (count($tags) === 0) {
386
+                    continue;
387
+                }
374 388
                 /** @var DocBlock\Tags\BaseTag $return */
375 389
                 $return = $tags[0];
376 390
                 $this->addMultiline(':License: ' . RstBuilder::escape($return->getDescription()), true);
@@ -400,8 +414,9 @@  discard block
 block discarded – undo
400 414
                 $result .= $type . ' | ';
401 415
                 continue;
402 416
             }
403
-            if (0 === strpos($type, '\\'))
404
-                $type = substr($type, 1);
417
+            if (0 === strpos($type, '\\')) {
418
+                            $type = substr($type, 1);
419
+            }
405 420
             $result .= ':any:`' . RstBuilder::escape($type) . '` | ';
406 421
         }
407 422
         return substr($result, 0, -3);
Please login to merge, or discard this patch.