Skip to content

Commit 529310b

Browse files
committed
code cosmetics
1 parent 7533523 commit 529310b

File tree

13 files changed

+37
-123
lines changed

13 files changed

+37
-123
lines changed

class/Files/Blocks/BlocksFiles.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
*/
3333
class BlocksFiles extends Files\CreateFile
3434
{
35-
/**
36-
* @var mixed
37-
*/
38-
private $axc = null;
3935

4036
/**
4137
* @var mixed

class/Files/Classes/ClassFiles.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ private function getPermissionsInForm($moduleDirname, $fieldId, $tableName)
388388
*/
389389
private function getValuesInObject($moduleDirname, $table, $fields)
390390
{
391-
$tc = Modulebuilder\Helper::getInstance();
392391
$ucfTableName = ucfirst($table->getVar('table_name'));
393392
$ret = $this->pc->getPhpCodeCommentMultiLine(['Get' => 'Values', '@param null $keys' => '', '@param null $format' => '', '@param null$maxDepth' => '', '@return' => 'array'], "\t");
394393
$ucfModuleDirname = ucfirst($moduleDirname);

class/Files/CreatePhpCode.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,9 @@ public function getPhpCodeWhile($var = null, $content = null, $value = null, $op
440440
*
441441
* @param $op
442442
* @param $content
443-
* @param $t
443+
* @param string $t
444444
*
445+
* @param bool $isParam
445446
* @return string
446447
*/
447448
public function getPhpCodeSwitch($op = null, $content = null, $t = '', $isParam = true)
@@ -457,11 +458,12 @@ public function getPhpCodeSwitch($op = null, $content = null, $t = '', $isParam
457458
/**
458459
* @public function getPhpCodeCaseSwitch
459460
*
460-
* @param $cases
461-
* @param $defaultAfterCase
462-
* @param $default
463-
* @param $t
461+
* @param array $cases
462+
* @param bool $defaultAfterCase
463+
* @param bool $default
464+
* @param string $t
464465
*
466+
* @param bool $isConst
465467
* @return string
466468
*/
467469
public function getPhpCodeCaseSwitch($cases = [], $defaultAfterCase = false, $default = false, $t = '', $isConst = false)

class/Files/CreateStructure.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ class CreateStructure
4242
* @var string
4343
*/
4444
private $fileName;
45-
/**
46-
* @var string
47-
*/
48-
private $path;
4945
/**
5046
* @var mixed
5147
*/

class/Files/CreateXoopsCode.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ public static function getInstance()
5050

5151
/**
5252
* @public function getXcSwitch
53-
* @param $op
54-
* @param $cases
55-
* @param $defaultAfterCase
56-
* @param $default
57-
* @param $t - Indentation
53+
* @param string $op
54+
* @param array $cases
55+
* @param bool $defaultAfterCase
56+
* @param bool $default
57+
* @param string $t - Indentation
5858
*
59+
* @param bool $isString
60+
* @param bool $isConst
5961
* @return string
6062
*/
6163
public function getXcSwitch($op = '', $cases = [], $defaultAfterCase = false, $default = false, $t = '', $isString = true, $isConst = false)
@@ -1669,6 +1671,7 @@ public function getXcXoopsModuleGetInfo($left, $string, $isParam = false, $t = '
16691671
* @param string $style
16701672
*
16711673
* @param string $t
1674+
* @param bool $isString
16721675
* @return string
16731676
*/
16741677
public function getXcXoThemeAddStylesheet($style = 'style', $t = '', $isString = true)

class/Files/Language/LanguageModinfo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ private function getLanguageRatingbars($language)
494494
*/
495495
private function getLanguageFooter()
496496
{
497-
$df = LanguageDefines::getInstance();
498497
$ret = $this->ld->getBelowDefines('End');
499498
$ret .= $this->ld->getBlankLine();
500499

@@ -522,6 +521,7 @@ public function render()
522521
$notifTable = '';
523522
$tableBrokens = [];
524523
$tableComments = [];
524+
$tableRate = [];
525525
foreach (array_keys($tables) as $t) {
526526
$tableName = $tables[$t]->getVar('table_name');
527527
$tableSoleName = $tables[$t]->getVar('table_solename');
@@ -554,7 +554,7 @@ public function render()
554554
$content .= $this->getLanguageSubmenu($language, $tables);
555555
}
556556
if (in_array(1, $tableRate)) {
557-
$content .= $this->getLanguageRatingbars($language, $tables);
557+
$content .= $this->getLanguageRatingbars($language);
558558
}
559559

560560
//if (in_array(1, $tableBlocks)) {

class/Files/Sql/SqlFile.php

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,15 @@ private function getHeadDatabaseTable($moduleDirname, $tableName, $fieldsNumb)
138138
*/
139139
private function getDatabaseTables($module)
140140
{
141-
$ret = null;
142-
$moduleDirname = mb_strtolower($module->getVar('mod_dirname'));
143-
$tables = $this->getTableTables($module->getVar('mod_id'), 'table_order ASC, table_id');
144-
$tableRate = 0;
141+
$ret = null;
142+
$moduleDirname = mb_strtolower($module->getVar('mod_dirname'));
143+
$tables = $this->getTableTables($module->getVar('mod_id'), 'table_order ASC, table_id');
144+
$tableMid = 0;
145+
$tableId = 0;
146+
$tableName = 0;
147+
$tableAutoincrement = 0;
148+
$fieldsNumb = 0;
149+
$tableRate = 0;
145150
foreach (array_keys($tables) as $t) {
146151
$tableId = $tables[$t]->getVar('table_id');
147152
$tableMid = $tables[$t]->getVar('table_mid');
@@ -155,7 +160,7 @@ private function getDatabaseTables($module)
155160
}
156161

157162
if (1 === $tableRate) {
158-
$ret .= $this->getTableRatings($moduleDirname, $tableMid, $tableId, $tableName, $tableAutoincrement, $fieldsNumb);
163+
$ret .= $this->getTableRatings($moduleDirname);
159164
}
160165

161166
return $ret;
@@ -345,23 +350,16 @@ private function getDatabaseFields($moduleDirname, $tableMid, $tableId, $tableNa
345350
* @private function getDatabaseFields
346351
*
347352
* @param $moduleDirname
348-
* @param $tableMid
349-
* @param $tableId
350-
* @param $tableName
351-
* @param $tableAutoincrement
352-
* @param $fieldsNumb
353353
* @return null|string
354354
*/
355-
private function getTableRatings($moduleDirname, $tableMid, $tableId, $tableName, $tableAutoincrement, $fieldsNumb)
355+
private function getTableRatings($moduleDirname)
356356
{
357-
$helper = Modulebuilder\Helper::getInstance();
358357
$ret = null;
359358
$j = 0;
360359
$comma = [];
361360
$row = [];
362361

363362
$ret = $this->getHeadDatabaseTable($moduleDirname, 'ratings', 6);
364-
//$row[] = $this->getFieldRow($fieldName, $type, $fieldAttribute, $fieldNull, $default);
365363
$row[] = $this->getFieldRow('rate_id', 'INT(8)', 'UNSIGNED', 'NOT NULL', null, 'AUTO_INCREMENT');
366364
$comma[$j] = $this->getKey(2, 'rate_id');
367365
++$j;
@@ -463,19 +461,6 @@ private function getKey($key, $fieldName)
463461
return $ret;
464462
}
465463

466-
/**
467-
* @private function getComma
468-
*
469-
* @param $row
470-
* @param $comma
471-
*
472-
* @return string
473-
*/
474-
private function getComma($row, $comma = null)
475-
{
476-
return " {$row}{$comma}";
477-
}
478-
479464
/**
480465
* @public function render
481466
*

class/Files/Templates/User/Defstyle/PagesItem.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public function write($module, $table, $tables, $filename)
8989
* @param $tableMid
9090
* @param $tableName
9191
* @param $tableSoleName
92+
* @param $tableRate
9293
* @param $language
9394
* @return string
9495
*/

class/Files/Templates/User/Defstyle/Search.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,10 @@ private function getTemplatesUserSearchHeader($moduleDirname, $table, $language)
106106
* @private function getTemplatesUserSearchBody
107107
* @param string $moduleDirname
108108
* @param string $table
109-
* @param string $language
110109
*
111110
* @return string
112111
*/
113-
private function getTemplatesUserSearchBody($moduleDirname, $table, $language)
112+
private function getTemplatesUserSearchBody($moduleDirname, $table)
114113
{
115114
$tableName = $table->getVar('table_name');
116115
$ret = <<<EOT
@@ -162,11 +161,10 @@ private function getTemplatesUserSearchBody($moduleDirname, $table, $language)
162161
* @private function getTemplatesUserSearchBodyFieldnameEmpty
163162
* @param string $moduleDirname
164163
* @param string $table
165-
* @param string $language
166164
*
167165
* @return string
168166
*/
169-
private function getTemplatesUserSearchBodyFieldnameEmpty($moduleDirname, $table, $language)
167+
private function getTemplatesUserSearchBodyFieldnameEmpty($moduleDirname, $table)
170168
{
171169
$tableName = $table->getVar('table_name');
172170
$ret = <<<EOT
@@ -238,9 +236,9 @@ public function render()
238236
$content = $this->getTemplatesUserSearchHeader($moduleDirname, $table, $language);
239237
// Verify if table_fieldname is not empty
240238
if (!empty($tableFieldname)) {
241-
$content .= $this->getTemplatesUserSearchBody($moduleDirname, $table, $language);
239+
$content .= $this->getTemplatesUserSearchBody($moduleDirname, $table);
242240
} else {
243-
$content .= $this->getTemplatesUserSearchBodyFieldnameEmpty($moduleDirname, $table, $language);
241+
$content .= $this->getTemplatesUserSearchBodyFieldnameEmpty($moduleDirname, $table);
244242
}
245243
$content .= $this->getTemplatesUserSearchFooter($moduleDirname);
246244

class/Files/User/UserPages.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ private function getUserPagesHeader($moduleDirname, $tableName, $fieldId)
129129

130130
/**
131131
* @private function getUserPagesList
132+
* @param $moduleDirname
132133
* @param $tableName
133134
* @param $fieldId
134135
* @param $fieldMain
136+
* @param $tableRate
135137
* @param string $t
136138
* @return string
137139
*/
@@ -503,6 +505,7 @@ private function getUserPagesFooter($moduleDirname, $tableName, $tableComments,
503505
* @param $fieldMain
504506
* @param $fieldStatus
505507
* @param $tableNotifications
508+
* @param $tableRate
506509
* @param $language
507510
* @param $t
508511
* @return string

0 commit comments

Comments
 (0)