Passed
Push — master ( e951dd...16bd1d )
by Arthur
02:47
created
src/Blocks/ContentManager.php 1 patch
Spacing   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,13 +83,11 @@  discard block
 block discarded – undo
83 83
         // get params
84 84
         $params = $this->getMethodParams($methodOptions->getParams());
85 85
         $this->sourceCode .= PhpInterface::TAB_PSR4 . $methodOptions->getModifier() . PhpInterface::SPACE .
86
-            (($methodOptions->isStatic() !== false) ? PhpInterface::PHP_STATIC . PhpInterface::SPACE :
87
-                '') .
86
+            (($methodOptions->isStatic() !== false) ? PhpInterface::PHP_STATIC . PhpInterface::SPACE : '') .
88 87
             PhpInterface::PHP_FUNCTION . PhpInterface::SPACE .
89 88
             $methodOptions->getName()
90 89
             . PhpInterface::OPEN_PARENTHESES . $params . PhpInterface::CLOSE_PARENTHESES .
91
-            ((empty($methodOptions->getReturnType())) ? '' :
92
-                PhpInterface::COLON . PhpInterface::SPACE . $methodOptions->getReturnType()) .
90
+            ((empty($methodOptions->getReturnType())) ? '' : PhpInterface::COLON . PhpInterface::SPACE . $methodOptions->getReturnType()) .
93 91
             PhpInterface::SPACE . PHP_EOL . PhpInterface::TAB_PSR4
94 92
             . PhpInterface::OPEN_BRACE . PHP_EOL;
95 93
     }
@@ -103,8 +101,7 @@  discard block
 block discarded – undo
103 101
     protected function setMethodReturn(string $value, $isString = false): void
104 102
     {
105 103
         $this->setTabs(2);
106
-        $this->sourceCode .= PhpInterface::PHP_RETURN . PhpInterface::SPACE . (($isString === false) ? $value :
107
-                PhpInterface::DOUBLE_QUOTES . $value . PhpInterface::DOUBLE_QUOTES) . PhpInterface::SEMICOLON . PHP_EOL;
104
+        $this->sourceCode .= PhpInterface::PHP_RETURN . PhpInterface::SPACE . (($isString === false) ? $value : PhpInterface::DOUBLE_QUOTES . $value . PhpInterface::DOUBLE_QUOTES) . PhpInterface::SEMICOLON . PHP_EOL;
108 105
     }
109 106
 
110 107
     /**
Please login to merge, or discard this patch.
src/Blocks/FileManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public static function createFile($fileName, $content, $isNew = false): bool
28 28
     {
29
-        if($isNew === true || file_exists($fileName) === false)
29
+        if ($isNew === true || file_exists($fileName) === false)
30 30
         {
31 31
             $fp = fopen($fileName, self::FILE_MODE_CREATE);
32 32
             fwrite($fp, $content);
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public static function createPath($path)
46 46
     {
47
-        if(is_dir($path) === false)
47
+        if (is_dir($path) === false)
48 48
         {
49
-            if(mkdir($path, self::DIR_MODE, true) === false)
49
+            if (mkdir($path, self::DIR_MODE, true) === false)
50 50
             {
51 51
                 throw new DirectoryException(
52 52
                     'Couldn`t create directory '
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         /** @var ApiGenerator $obj */
74 74
         $path = $obj->modulesDir . PhpInterface::SLASH . strtoupper($obj->version) . PhpInterface::SLASH;
75 75
 
76
-        if($http === true)
76
+        if ($http === true)
77 77
         {
78 78
             $path .= $obj->httpDir . PhpInterface::SLASH;
79 79
         }
Please login to merge, or discard this patch.