Passed
Push — master ( 474df4...e81e63 )
by Goffy
03:32
created
index.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
     Github\GithubClient
29 29
 };
30 30
 
31
-require __DIR__ . '/header.php';
31
+require __DIR__.'/header.php';
32 32
 $GLOBALS['xoopsOption']['template_main'] = 'wggithub_index.tpl';
33
-include_once \XOOPS_ROOT_PATH . '/header.php';
33
+include_once \XOOPS_ROOT_PATH.'/header.php';
34 34
 
35 35
 // Permissions
36 36
 $permGlobalView = $permissionsHandler->getPermGlobalView();
37 37
 if (!$permGlobalView) {
38 38
     $GLOBALS['xoopsTpl']->assign('error', _NOPERM);
39
-    require __DIR__ . '/footer.php';
39
+    require __DIR__.'/footer.php';
40 40
 }
41 41
 $permGlobalRead   = $permissionsHandler->getPermGlobalRead();
42 42
 $permReadmeUpdate = $permissionsHandler->getPermReadmeUpdate();
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 // Define Stylesheet
53 53
 $GLOBALS['xoTheme']->addStylesheet($style, null);
54
-$GLOBALS['xoTheme']->addStylesheet(\WGGITHUB_URL . '/assets/css/tabs.css', null);
54
+$GLOBALS['xoTheme']->addStylesheet(\WGGITHUB_URL.'/assets/css/tabs.css', null);
55 55
 $keywords = [];
56 56
 // 
57 57
 $GLOBALS['xoopsTpl']->assign('xoops_icons32_url', XOOPS_ICONS32_URL);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         }
145 145
         unset($crLogs);
146 146
 
147
-        $menu  = Request::getInt('menu', 0);
147
+        $menu = Request::getInt('menu', 0);
148 148
 
149 149
         $crDirectories = new \CriteriaCompo();
150 150
         $crDirectories->add(new \Criteria('dir_online', 1));
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             foreach (\array_keys($directoriesAll) as $i) {
160 160
                 $directories[$i] = $directoriesAll[$i]->getValuesDirectories();
161 161
                 $dirName = $directoriesAll[$i]->getVar('dir_name');
162
-                $dirFilterRelease = (bool)$directoriesAll[$i]->getVar('dir_filterrelease');
162
+                $dirFilterRelease = (bool) $directoriesAll[$i]->getVar('dir_filterrelease');
163 163
                 $repos = [];
164 164
                 $crRepositories = new \CriteriaCompo();
165 165
                 //first block/parentheses
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                 $crRepo2->add(new \Criteria('repo_status', Constants::STATUS_UPTODATE), 'OR');
173 173
                 $crRepositories->add($crRepo2);
174 174
                 //third
175
-                $autoApproved = (int)$helper->getConfig('autoapproved');
175
+                $autoApproved = (int) $helper->getConfig('autoapproved');
176 176
                 if (!$autoApproved) {
177 177
                     //third
178 178
                     $crRepo3 = new \CriteriaCompo();
@@ -251,9 +251,9 @@  discard block
 block discarded – undo
251 251
                 }
252 252
                 $directories[$i]['repos'] = $repos;
253 253
                 $directories[$i]['previousRepos'] = $dirStart[$i] > 0;
254
-                $directories[$i]['previousOp'] = '&dirId=' . $i . '&start=' . ($dirStart[$i] - $dirLimit[$i]) . '&limit=' . $dirLimit[$i] . '&frelease=' . $filterRelease . '&fsortby=' . $filterSortby;
254
+                $directories[$i]['previousOp'] = '&dirId='.$i.'&start='.($dirStart[$i] - $dirLimit[$i]).'&limit='.$dirLimit[$i].'&frelease='.$filterRelease.'&fsortby='.$filterSortby;
255 255
                 $directories[$i]['nextRepos'] = ($repositoriesCount - $dirStart[$i]) > $dirLimit[$i];
256
-                $directories[$i]['nextOp'] = '&dirId=' . $i . '&start=' . ($dirStart[$i] + $dirLimit[$i]) . '&limit=' . $dirLimit[$i] . '&frelease=' . $filterRelease . '&fsortby=' . $filterSortby;
256
+                $directories[$i]['nextOp'] = '&dirId='.$i.'&start='.($dirStart[$i] + $dirLimit[$i]).'&limit='.$dirLimit[$i].'&frelease='.$filterRelease.'&fsortby='.$filterSortby;
257 257
                 $GLOBALS['xoopsTpl']->assign('menu', $menu);
258 258
                 $GLOBALS['xoopsTpl']->assign('directories', $directories);
259 259
             }
@@ -271,10 +271,10 @@  discard block
 block discarded – undo
271 271
         // Permissions
272 272
         if (!$permGlobalRead) {
273 273
             $GLOBALS['xoopsTpl']->assign('error', \_NOPERM);
274
-            require __DIR__ . '/footer.php';
274
+            require __DIR__.'/footer.php';
275 275
         }
276 276
         $dirName = Request::getString('dir_name', '');
277
-        $redir   = 'index.php?op=list_afterupdate&frelease=' . $filterRelease . '&fsortby=' . $filterSortby;
277
+        $redir   = 'index.php?op=list_afterupdate&frelease='.$filterRelease.'&fsortby='.$filterSortby;
278 278
         $githubClient = GithubClient::getInstance();
279 279
         $result = $githubClient->executeUpdate($dirName);
280 280
         if ($result) {
@@ -288,12 +288,12 @@  discard block
 block discarded – undo
288 288
         // Permissions
289 289
         if (!$permReadmeUpdate) {
290 290
             $GLOBALS['xoopsTpl']->assign('error', \_NOPERM);
291
-            require __DIR__ . '/footer.php';
291
+            require __DIR__.'/footer.php';
292 292
         }
293 293
         $repoId   = Request::getInt('repo_id', 0);
294 294
         $repoUser = Request::getString('repo_user', 'none');
295 295
         $repoName = Request::getString('repo_name', 'none');
296
-        $redir    = 'index.php?op=list_afterupdate&frelease=' . $filterRelease . '&fsortby=' . $filterSortby;
296
+        $redir    = 'index.php?op=list_afterupdate&frelease='.$filterRelease.'&fsortby='.$filterSortby;
297 297
         $result = $helper->getHandler('Readmes')->updateReadmes($repoId, $repoUser, $repoName);
298 298
         if ($result) {
299 299
             \redirect_header($redir, 2, \_MA_WGGITHUB_READGH_SUCCESS);
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
         }
303 303
         break;
304 304
     case 'api_error':
305
-        $error = Request::getString('message') . '<br>' . Request::getString('url');
305
+        $error = Request::getString('message').'<br>'.Request::getString('url');
306 306
         $GLOBALS['xoopsTpl']->assign('error', $error);
307 307
         break;
308 308
 }
@@ -311,11 +311,11 @@  discard block
 block discarded – undo
311 311
 // Breadcrumbs
312 312
 $xoBreadcrumbs[] = ['title' => \_MA_WGGITHUB_INDEX];
313 313
 // Keywords
314
-wggithubMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords));
314
+wggithubMetaKeywords($helper->getConfig('keywords').', '.\implode(',', $keywords));
315 315
 unset($keywords);
316 316
 // Description
317 317
 wggithubMetaDescription(\_MA_WGGITHUB_INDEX_DESC);
318 318
 $GLOBALS['xoopsTpl']->assign('xoops_mpageurl', \WGGITHUB_URL.'/index.php');
319 319
 $GLOBALS['xoopsTpl']->assign('xoops_icons32_url', XOOPS_ICONS32_URL);
320 320
 $GLOBALS['xoopsTpl']->assign('wggithub_upload_url', \WGGITHUB_UPLOAD_URL);
321
-require __DIR__ . '/footer.php';
321
+require __DIR__.'/footer.php';
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
  * @author         Goffy - XOOPS Development Team - Email:<[email protected]> - Website:<https://wedega.com>
21 21
  */
22 22
 
23
-include \dirname(__DIR__, 2) . '/mainfile.php';
24
-include __DIR__ . '/include/common.php';
23
+include \dirname(__DIR__, 2).'/mainfile.php';
24
+include __DIR__.'/include/common.php';
25 25
 $moduleDirName = \basename(__DIR__);
26 26
 
27 27
 $helper = \XoopsModules\Wggithub\Helper::getInstance();
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 $xoBreadcrumbs = [];
31 31
 if ($helper->getConfig('show_breadcrumbs')) {
32 32
     if (isset($GLOBALS['xoopsModule']) && \is_object($GLOBALS['xoopsModule'])) {
33
-        $xoBreadcrumbs[] = ['title' => $GLOBALS['xoopsModule']->getVar('name'), 'link' => \WGGITHUB_URL . '/'];
33
+        $xoBreadcrumbs[] = ['title' => $GLOBALS['xoopsModule']->getVar('name'), 'link' => \WGGITHUB_URL.'/'];
34 34
     }
35 35
 }
36 36
 // Get instance of module
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 // 
45 45
 $myts = MyTextSanitizer::getInstance();
46 46
 // Default Css Style
47
-$style = \WGGITHUB_URL . '/assets/css/style.css';
47
+$style = \WGGITHUB_URL.'/assets/css/style.css';
48 48
 // Smarty Default
49 49
 $sysPathIcon16 = $GLOBALS['xoopsModule']->getInfo('sysicons16');
50 50
 $sysPathIcon32 = $GLOBALS['xoopsModule']->getInfo('sysicons32');
Please login to merge, or discard this patch.
admin/broken.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 use XoopsModules\Wggithub;
25 25
 use XoopsModules\Wggithub\Constants;
26 26
 
27
-require __DIR__ . '/header.php';
27
+require __DIR__.'/header.php';
28 28
 
29 29
 // Define Stylesheet
30 30
 $GLOBALS['xoTheme']->addStylesheet($style, null);
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     }
53 53
     // Display Navigation
54 54
     if ($repositoriesCount > $limit) {
55
-        include_once \XOOPS_ROOT_PATH . '/class/pagenav.php';
56
-        $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'startRepositories', 'op=list&limitRepositories=' . $limit);
55
+        include_once \XOOPS_ROOT_PATH.'/class/pagenav.php';
56
+        $pagenav = new \XoopsPageNav($repositoriesCount, $limit, $start, 'startRepositories', 'op=list&limitRepositories='.$limit);
57 57
         $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
58 58
     }
59 59
 } else {
@@ -61,4 +61,4 @@  discard block
 block discarded – undo
61 61
 }
62 62
 unset($crRepositories);
63 63
 
64
-require __DIR__ . '/footer.php';
64
+require __DIR__.'/footer.php';
Please login to merge, or discard this patch.
admin/requests.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 use XoopsModules\Wggithub\Constants;
26 26
 use XoopsModules\Wggithub\Common;
27 27
 
28
-require __DIR__ . '/header.php';
28
+require __DIR__.'/header.php';
29 29
 // It recovered the value of argument op in URL$
30 30
 $op = Request::getCmd('op', 'list');
31 31
 // Request req_id
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
             }
56 56
             // Display Navigation
57 57
             if ($requestsCount > $limit) {
58
-                include_once \XOOPS_ROOT_PATH . '/class/pagenav.php';
59
-                $pagenav = new \XoopsPageNav($requestsCount, $limit, $start, 'start', 'op=list&limit=' . $limit);
58
+                include_once \XOOPS_ROOT_PATH.'/class/pagenav.php';
59
+                $pagenav = new \XoopsPageNav($requestsCount, $limit, $start, 'start', 'op=list&limit='.$limit);
60 60
                 $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
61 61
             }
62 62
         } else {
@@ -133,4 +133,4 @@  discard block
 block discarded – undo
133 133
         }
134 134
         break;
135 135
 }
136
-require __DIR__ . '/footer.php';
136
+require __DIR__.'/footer.php';
Please login to merge, or discard this patch.
include/functions.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $cat_sql .= current($cats);
34 34
         \array_shift($cats);
35 35
         foreach ($cats as $cat) {
36
-            $cat_sql .= ',' . $cat;
36
+            $cat_sql .= ','.$cat;
37 37
         }
38 38
     }
39 39
     $cat_sql .= ')';
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 {
73 73
     global $xoopsTpl, $xoTheme;
74 74
     $myts = MyTextSanitizer::getInstance();
75
-    $content= $myts->undoHtmlSpecialChars($myts->displayTarea($content));
76
-    if(isset($xoTheme) && \is_object($xoTheme)) {
77
-        $xoTheme->addMeta( 'meta', 'keywords', \strip_tags($content));
75
+    $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content));
76
+    if (isset($xoTheme) && \is_object($xoTheme)) {
77
+        $xoTheme->addMeta('meta', 'keywords', \strip_tags($content));
78 78
     } else {    // Compatibility for old Xoops versions
79 79
         $xoopsTpl->assign('xoops_meta_keywords', \strip_tags($content));
80 80
     }
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
     global $xoopsTpl, $xoTheme;
92 92
     $myts = MyTextSanitizer::getInstance();
93 93
     $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content));
94
-    if(isset($xoTheme) && \is_object($xoTheme)) {
95
-        $xoTheme->addMeta( 'meta', 'description', \strip_tags($content));
94
+    if (isset($xoTheme) && \is_object($xoTheme)) {
95
+        $xoTheme->addMeta('meta', 'description', \strip_tags($content));
96 96
     } else {    // Compatibility for old Xoops versions
97 97
         $xoopsTpl->assign('xoops_meta_description', \strip_tags($content));
98 98
     }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     if (0 != $lenght_id) {
118 118
         $id = $array['content_id'];
119 119
         while (\strlen($id) < $lenght_id) {
120
-            $id = '0' . $id;
120
+            $id = '0'.$id;
121 121
         }
122 122
     } else {
123 123
         $id = $array['content_id'];
@@ -132,23 +132,23 @@  discard block
 block discarded – undo
132 132
     switch ($rewrite_url) {
133 133
 
134 134
         case 'none':
135
-            if($topic_name) {
136
-                 $topic_name = 'topic=' . $topic_name . '&amp;';
135
+            if ($topic_name) {
136
+                 $topic_name = 'topic='.$topic_name.'&amp;';
137 137
             }
138 138
             $rewrite_base = '/modules/';
139
-            $page = 'page=' . $array['content_alias'];
140
-            return \XOOPS_URL . $rewrite_base . $module . '/' . $type . '.php?' . $topic_name . 'id=' . $id . '&amp;' . $page . $comment;
139
+            $page = 'page='.$array['content_alias'];
140
+            return \XOOPS_URL.$rewrite_base.$module.'/'.$type.'.php?'.$topic_name.'id='.$id.'&amp;'.$page.$comment;
141 141
             break;
142 142
 
143 143
         case 'rewrite':
144
-            if($topic_name) {
144
+            if ($topic_name) {
145 145
                 $topic_name .= '/';
146 146
             }
147 147
             $rewrite_base = xoops_getModuleOption('rewrite_mode', $module);
148 148
             $rewrite_ext = xoops_getModuleOption('rewrite_ext', $module);
149 149
             $module_name = '';
150
-            if(xoops_getModuleOption('rewrite_name', $module)) {
151
-                $module_name = xoops_getModuleOption('rewrite_name', $module) . '/';
150
+            if (xoops_getModuleOption('rewrite_name', $module)) {
151
+                $module_name = xoops_getModuleOption('rewrite_name', $module).'/';
152 152
             }
153 153
             $page = $array['content_alias'];
154 154
             $type .= '/';
@@ -157,21 +157,21 @@  discard block
 block discarded – undo
157 157
                 $type = '';
158 158
             }
159 159
             if ('comment-edit/' === $type || 'comment-reply/' === $type || 'comment-delete/' === $type) {
160
-                return \XOOPS_URL . $rewrite_base . $module_name . $type . $id . '/';
160
+                return \XOOPS_URL.$rewrite_base.$module_name.$type.$id.'/';
161 161
             }
162 162
 
163
-            return \XOOPS_URL . $rewrite_base . $module_name . $type . $topic_name  . $id . $page . $rewrite_ext;
163
+            return \XOOPS_URL.$rewrite_base.$module_name.$type.$topic_name.$id.$page.$rewrite_ext;
164 164
             break;
165 165
 
166 166
          case 'short':
167
-            if($topic_name) {
167
+            if ($topic_name) {
168 168
                 $topic_name .= '/';
169 169
             }
170 170
             $rewrite_base = xoops_getModuleOption('rewrite_mode', $module);
171 171
             $rewrite_ext = xoops_getModuleOption('rewrite_ext', $module);
172 172
             $module_name = '';
173
-            if(xoops_getModuleOption('rewrite_name', $module)) {
174
-                $module_name = xoops_getModuleOption('rewrite_name', $module) . '/';
173
+            if (xoops_getModuleOption('rewrite_name', $module)) {
174
+                $module_name = xoops_getModuleOption('rewrite_name', $module).'/';
175 175
             }
176 176
             $page = $array['content_alias'];
177 177
             $type .= '/';
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
                 $type = '';
180 180
             }
181 181
             if ('comment-edit/' === $type || 'comment-reply/' === $type || 'comment-delete/' === $type) {
182
-                return \XOOPS_URL . $rewrite_base . $module_name . $type . $id . '/';
182
+                return \XOOPS_URL.$rewrite_base.$module_name.$type.$id.'/';
183 183
             }
184 184
 
185
-            return \XOOPS_URL . $rewrite_base . $module_name . $type . $topic_name . $page . $rewrite_ext;
185
+            return \XOOPS_URL.$rewrite_base.$module_name.$type.$topic_name.$page.$rewrite_ext;
186 186
             break;
187 187
     }
188 188
     return null;
Please login to merge, or discard this patch.
class/Github/Http/StreamClient.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,15 +47,15 @@  discard block
 block discarded – undo
47 47
         $options = [
48 48
             'http' => [
49 49
                 'method' => $request->getMethod(),
50
-                'header' => \implode("\r\n", $headerStr) . "\r\n",
51
-                'follow_location' => 0,  # Github sets the Location header for 201 code too and redirection is not required for us
50
+                'header' => \implode("\r\n", $headerStr)."\r\n",
51
+                'follow_location' => 0, # Github sets the Location header for 201 code too and redirection is not required for us
52 52
                 'protocol_version' => 1.1,
53 53
                 'ignore_errors' => TRUE,
54 54
             ],
55 55
             'ssl' => [
56 56
                 'verify_peer' => TRUE,
57
-                'cafile' => realpath(__DIR__ . '/../../ca-chain.crt'),
58
-                'disable_compression' => TRUE,  # Effective since PHP 5.4.13
57
+                'cafile' => realpath(__DIR__.'/../../ca-chain.crt'),
58
+                'disable_compression' => TRUE, # Effective since PHP 5.4.13
59 59
             ],
60 60
         ];
61 61
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $last = '';
106 106
         foreach ($http_response_header as $header) {
107 107
             if (\in_array(\substr($header, 0, 1), [' ', "\t"], TRUE)) {
108
-                $headers[$last] .= ' ' . \trim($header);  # RFC2616, 2.2
108
+                $headers[$last] .= ' '.\trim($header); # RFC2616, 2.2
109 109
             } else {
110 110
                 list($name, $value) = \explode(':', $header, 2) + [NULL, NULL];
111 111
                 $headers[$last = \trim($name)] = \trim($value);
Please login to merge, or discard this patch.
include/update.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,21 +54,21 @@  discard block
 block discarded – undo
54 54
  */
55 55
 function xoops_module_update_wggithub($module, $prev_version = null)
56 56
 {
57
-    require \dirname(__DIR__) . '/preloads/autoloader.php';
57
+    require \dirname(__DIR__).'/preloads/autoloader.php';
58 58
 
59 59
     $moduleDirName = $module->dirname();
60 60
 
61 61
     //wggithub_check_db($module);
62 62
 
63 63
     //check upload directory
64
-    include_once __DIR__ . '/install.php';
64
+    include_once __DIR__.'/install.php';
65 65
     xoops_module_install_wggithub($module);
66 66
 
67 67
     // update DB corresponding to sql/mysql.sql
68 68
     $configurator = new Configurator();
69 69
     $migrate = new Migrate($configurator);
70 70
 
71
-    $fileSql = \XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/sql/mysql.sql';
71
+    $fileSql = \XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/sql/mysql.sql';
72 72
     // ToDo: add function setDefinitionFile to .\class\libraries\vendor\xoops\xmf\src\Database\Migrate.php
73 73
     // Todo: once we are using setDefinitionFile this part has to be adapted
74 74
     //$fileYaml = \XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/sql/update_' . $moduleDirName . '_migrate.yml';
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     //} catch (\Exception $e) {
78 78
     // as long as this is not done default file has to be created
79 79
     $moduleVersion = $module->getInfo('version');
80
-    $fileYaml = \XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . "/sql/{$moduleDirName}_{$moduleVersion}_migrate.yml";
80
+    $fileYaml = \XOOPS_ROOT_PATH.'/modules/'.$moduleDirName."/sql/{$moduleDirName}_{$moduleVersion}_migrate.yml";
81 81
     //}
82 82
 
83 83
     // create a schema file based on sql/mysql.sql
Please login to merge, or discard this patch.
class/Common/MigrateHelper.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 $skip = false;
95 95
                 $options = '';
96 96
                 // start table definition
97
-                $tableName = $this->getTableName ($line);
97
+                $tableName = $this->getTableName($line);
98 98
                 $tables[$tableName] = [];
99 99
                 $tables[$tableName]['options'] = '';
100 100
                 $tables[$tableName]['columns'] = [];
@@ -140,22 +140,22 @@  discard block
 block discarded – undo
140 140
             $schema[] = "{$tkey}:\n";
141 141
             foreach ($table as $lkey => $line) {
142 142
                 if ('keys' == $lkey) {
143
-                    $schema[] = $level1 . "keys:\n";
143
+                    $schema[] = $level1."keys:\n";
144 144
                     foreach ($line as $kkey => $kvalue) {
145 145
                         foreach ($kvalue as $kkey2 => $kvalue2) {
146
-                            $schema[] = $level2 . $kkey2 . ":\n";
147
-                            $schema[] = $level3 . 'columns: ' . $kvalue2['columns'] . "\n";
148
-                            $schema[] = $level3 . 'unique: ' . $kvalue2['unique'] . "\n";
146
+                            $schema[] = $level2.$kkey2.":\n";
147
+                            $schema[] = $level3.'columns: '.$kvalue2['columns']."\n";
148
+                            $schema[] = $level3.'unique: '.$kvalue2['unique']."\n";
149 149
                         }
150 150
                     }
151 151
                 } elseif ('options' == $lkey) {
152
-                    $schema[] = $level1 . 'options: ' . $line . "\n";
152
+                    $schema[] = $level1.'options: '.$line."\n";
153 153
                 } else {
154
-                    $schema[] = $level1 . 'columns: ' . "\n";
154
+                    $schema[] = $level1.'columns: '."\n";
155 155
                     foreach ($line as $kkey => $kvalue) {
156
-                        $schema[] = $level2 . '-' . "\n";
156
+                        $schema[] = $level2.'-'."\n";
157 157
                         foreach ($kvalue as $kkey2 => $kvalue2) {
158
-                            $schema[] = $level3 . $kkey2 . ": " . $kvalue2 . "\n";
158
+                            $schema[] = $level3.$kkey2.": ".$kvalue2."\n";
159 159
                         }
160 160
                     }
161 161
                 }
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
      * @param  string $line
184 184
      * @return string|bool
185 185
      */
186
-    private function getTableName (string $line)
186
+    private function getTableName(string $line)
187 187
     {
188 188
 
189
-        $arrLine = \explode( '`', $line);
189
+        $arrLine = \explode('`', $line);
190 190
         if (\count($arrLine) > 0) {
191 191
             return $arrLine[1];
192 192
         }
@@ -201,12 +201,12 @@  discard block
 block discarded – undo
201 201
      * @param string $line
202 202
      * @return array|bool
203 203
      */
204
-    private function getColumns (string $line)
204
+    private function getColumns(string $line)
205 205
     {
206 206
 
207 207
         $columns = [];
208 208
 
209
-        $arrCol = \explode( ' ', \trim($line));
209
+        $arrCol = \explode(' ', \trim($line));
210 210
         if (\count($arrCol) > 0) {
211 211
             $name = \str_replace(['`'], '', $arrCol[0]);
212 212
         } else {
@@ -217,11 +217,11 @@  discard block
 block discarded – undo
217 217
         $columns['name'] = $name;
218 218
         // update quotes
219 219
         if (\strpos($attributes, "''") > 0) {
220
-            $attributes = \trim(\str_replace("''", "''''''''" , $attributes));
220
+            $attributes = \trim(\str_replace("''", "''''''''", $attributes));
221 221
         } elseif (\strpos($attributes, "'") > 0) {
222
-            $attributes = \trim(\str_replace("'", "''" , $attributes));
222
+            $attributes = \trim(\str_replace("'", "''", $attributes));
223 223
         }
224
-        $columns['attributes'] = "' " . $attributes . " '";
224
+        $columns['attributes'] = "' ".$attributes." '";
225 225
 
226 226
         return $columns;
227 227
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      * @param string $options
235 235
      * @return void
236 236
      */
237
-    private function getOptions (string $line, string &$options): void
237
+    private function getOptions(string $line, string &$options): void
238 238
     {
239 239
 
240 240
         $lineText = \trim(\str_replace([')', ';'], '', $line));
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         if ('' != $options) {
244 244
             $options .= ' ';
245 245
         }
246
-        $options = "'" . $options . $lineText . "'";
246
+        $options = "'".$options.$lineText."'";
247 247
 
248 248
     }
249 249
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
      * @param string $line
254 254
      * @return array
255 255
      */
256
-    private function getKey (string $line)
256
+    private function getKey(string $line)
257 257
     {
258 258
 
259 259
         $key = [];
@@ -276,12 +276,12 @@  discard block
 block discarded – undo
276 276
                 if ('' == $name) {
277 277
                     $name = $columns;
278 278
                 }
279
-                if (\strpos($name,' ') > 0) {
280
-                    $name = "'" . $name . "'";
279
+                if (\strpos($name, ' ') > 0) {
280
+                    $name = "'".$name."'";
281 281
                 }
282 282
                 $key[$name] = [];
283
-                if (\strpos($columns,' ') > 0) {
284
-                    $columns = "'" . $columns . "'";
283
+                if (\strpos($columns, ' ') > 0) {
284
+                    $columns = "'".$columns."'";
285 285
                 }
286 286
                 $key[$name]['columns'] = $columns;
287 287
                 $key[$name]['unique'] = $unique;
Please login to merge, or discard this patch.