Completed
Push — master ( 2b4213...6816c3 )
by Aleh
9s
created
src/Padawan/Parser/ClassParser.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,15 +52,13 @@
 block discarded – undo
52 52
         foreach ($node->stmts AS $child) {
53 53
             if ($child instanceof ClassMethod) {
54 54
                 $classData->addMethod($this->parseMethod($child));
55
-            }
56
-            elseif ($child instanceof Property) {
55
+            } elseif ($child instanceof Property) {
57 56
                 foreach ($child->props AS $prop) {
58 57
                     $classData->addProp(
59 58
                         $this->parseProperty($prop, $child->type, $child->getAttribute('comments'))
60 59
                     );
61 60
                 }
62
-            }
63
-            elseif ($child instanceof ClassConst) {
61
+            } elseif ($child instanceof ClassConst) {
64 62
                 foreach ($child->consts AS $const) {
65 63
                     $classData->addConst($const->name);
66 64
                 }
Please login to merge, or discard this patch.
src/Padawan/Parser/ErrorFreePhpParser.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
     public function parse($content) {
9 9
         try {
10 10
             return parent::parse($content);
11
-        }
12
-        catch (\Exception $e) {
11
+        } catch (\Exception $e) {
13 12
             return $this->semValue;
14 13
         }
15 14
     }
Please login to merge, or discard this patch.
src/Padawan/Parser/ParamParser.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
     }
13 13
     public function parse(Param $node) {
14 14
         $param = new MethodParam($node->name);
15
-        if ($node->type instanceof Name)
16
-            $param->setFQCN($this->useParser->getFQCN($node->type));
17
-        else {
15
+        if ($node->type instanceof Name) {
16
+                    $param->setFQCN($this->useParser->getFQCN($node->type));
17
+        } else {
18 18
             $param->setType($node->type);
19 19
         }
20 20
         return $param;
Please login to merge, or discard this patch.
src/Padawan/Parser/Parser.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
         if (!$createCache || $oldHash !== $hash || empty($ast)) {
56 56
             try {
57 57
                 $ast = $this->parser->parse($content);
58
-            }
59
-            catch (\Exception $e) {
58
+            } catch (\Exception $e) {
60 59
                 $this->logger->addError(sprintf("Parsing failed in file %s\n", $file));
61 60
                 $this->logger->error($e);
62 61
                 return null;
Please login to merge, or discard this patch.
src/Padawan/Parser/CommentParser.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
     public function parse($content) {
9 9
         try {
10 10
             return parent::parse($content);
11
-        }
12
-        catch (\Exception $e) {
11
+        } catch (\Exception $e) {
13 12
             return $this->semValue;
14 13
         }
15 14
     }
Please login to merge, or discard this patch.
src/Padawan/Domain/Project/FQN.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,15 +8,12 @@
 block discarded – undo
8 8
         if ($namespace) {
9 9
             if ($namespace instanceof FQN) {
10 10
                 $this->parts = $namespace->getParts();
11
-            }
12
-            elseif (!is_array($namespace)) {
11
+            } elseif (!is_array($namespace)) {
13 12
                 $this->parts = explode("\\", $namespace);
14
-            }
15
-            else {
13
+            } else {
16 14
                 $this->parts = $namespace;
17 15
             }
18
-        }
19
-        else {
16
+        } else {
20 17
             $this->parts = [];
21 18
         }
22 19
     }
Please login to merge, or discard this patch.
src/Padawan/Domain/Project/FQCN.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.