Skip to content

Commit

Permalink
Compliance with draft standard of extended coding standard - https://…
Browse files Browse the repository at this point in the history
  • Loading branch information
thekabal committed Aug 28, 2017
1 parent 4a14ea1 commit 56d07bb
Show file tree
Hide file tree
Showing 87 changed files with 257 additions and 257 deletions.
4 changes: 2 additions & 2 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@
'footer', 'news', 'report', 'main', 'zoneedit',
'planet'));

$header = new Tki\Header;
$header = new Tki\Header();
$header->display($pdo_db, $lang, $template, $variables['title'], $variables['body_class']);

$template->addVariables('langvars', $langvars);
$template->addVariables('variables', $variables);
$template->display('admin.tpl');

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
18 changes: 9 additions & 9 deletions attack.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Tki\Login::checkLogin($pdo_db, $lang, $tkireg, $template);

$title = $langvars['l_att_title'];
$header = new Tki\Header;
$header = new Tki\Header();
$header->display($pdo_db, $lang, $template, $title);

// Database driven language entries
Expand All @@ -43,7 +43,7 @@
echo "You need to click on the ship first.<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand All @@ -68,7 +68,7 @@
$playerscore = $playerscore * $playerscore;
$targetscore = $targetscore * $targetscore;

$character_object = new \Tki\Character;
$character_object = new \Tki\Character();

// Check to ensure target is in the same sector as player
if ($targetinfo['sector'] != $playerinfo['sector'] || $targetinfo['on_planet'] == 'Y')
Expand All @@ -86,7 +86,7 @@
elseif ($_SESSION['in_combat'] !== null && $_SESSION['in_combat'] === true)
{
echo "<div style='color:#ff0;'>" . $langvars['l_team_already_combat'] . "</div>\n";
$admin_log = new Tki\AdminLog;
$admin_log = new Tki\AdminLog();
$admin_log->writeLog($pdo_db, 13371337, "{$playerinfo['ship_id']}|{$targetinfo['ship_id']}|Detected multi attack.");
}
else
Expand Down Expand Up @@ -627,15 +627,15 @@
Tki\Db::logDbErrors($pdo_db, $resx, __LINE__, __FILE__);
Tki\PlayerLog::writeLog($pdo_db, $targetinfo['ship_id'], \Tki\LogEnums::ATTACK_LOSE, "$playerinfo[character_name]|Y");
Tki\Bounty::collect($pdo_db, $langvars, $playerinfo['ship_id'], $targetinfo['ship_id']);
$admin_log = new Tki\AdminLog;
$admin_log = new Tki\AdminLog();
$admin_log->writeLog($pdo_db, \Tki\LogEnums::ATTACK_DEBUG, "*|{$playerinfo['ship_id']}|{$targetinfo['ship_id']}|Just lost the Escape Pod.");
}
else
{
Tki\PlayerLog::writeLog($pdo_db, $targetinfo['ship_id'], \Tki\LogEnums::ATTACK_LOSE, "$playerinfo[character_name]|N");
$character_object->kill($pdo_db, $targetinfo['ship_id'], $langvars, $tkireg, false);
Tki\Bounty::collect($pdo_db, $langvars, $playerinfo['ship_id'], $targetinfo['ship_id']);
$admin_log = new Tki\AdminLog;
$admin_log = new Tki\AdminLog();
$admin_log->writeLog($pdo_db, \Tki\LogEnums::ATTACK_DEBUG, "*|{$playerinfo['ship_id']}|{$targetinfo['ship_id']}|Didn't have the Escape Pod.");
}

Expand All @@ -653,7 +653,7 @@
{
$resx = $db->Execute("UPDATE {$db->prefix}kabal SET active= N WHERE kabal_id = ?;", array($targetinfo['email']));
Tki\Db::logDbErrors($pdo_db, $resx, __LINE__, __FILE__);
$admin_log = new Tki\AdminLog;
$admin_log = new Tki\AdminLog();
$admin_log->writeLog($pdo_db, \Tki\LogEnums::ATTACK_DEBUG, "*|{$playerinfo['ship_id']}|{$targetinfo['ship_id']}|Detected as AI.");

if ($rating_change > 0)
Expand All @@ -662,7 +662,7 @@
Tki\PlayerLog::writeLog($pdo_db, $targetinfo['ship_id'], \Tki\LogEnums::ATTACK_LOSE, "$playerinfo[character_name]|N");
Tki\Bounty::collect($pdo_db, $langvars, $playerinfo['ship_id'], $targetinfo['ship_id']);
$character_object->kill($pdo_db, $targetinfo['ship_id'], $langvars, $tkireg, false);
$admin_log = new Tki\AdminLog;
$admin_log = new Tki\AdminLog();
$admin_log->writeLog($pdo_db, \Tki\LogEnums::ATTACK_DEBUG, "*|{$playerinfo['ship_id']}|{$targetinfo['ship_id']}|Hope fully we only killed off the AI.");
}

Expand Down Expand Up @@ -904,5 +904,5 @@

Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
4 changes: 2 additions & 2 deletions beacon.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'footer', 'news'));
$title = $langvars['l_beacon_title'];

$header = new Tki\Header;
$header = new Tki\Header();
$header->display($pdo_db, $lang, $template, $title);

echo "<h1>" . $title . "</h1>\n";
Expand Down Expand Up @@ -151,5 +151,5 @@

Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
24 changes: 12 additions & 12 deletions bounty.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'footer', 'news'));
$title = $langvars['l_by_title'];

$header = new Tki\Header;
$header = new Tki\Header();
$header->display($pdo_db, $lang, $template, $title);

// Detect if this variable exists, and filter it. Returns false if anything wasn't right
Expand Down Expand Up @@ -160,7 +160,7 @@
echo $langvars['l_by_noturn'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand All @@ -172,7 +172,7 @@
echo $langvars['l_by_nobounty'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand All @@ -183,7 +183,7 @@
echo $langvars['l_by_notyours'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down Expand Up @@ -212,7 +212,7 @@
echo $langvars['l_by_notexists'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand All @@ -223,7 +223,7 @@
echo $langvars['l_by_destroyed'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand All @@ -233,7 +233,7 @@
echo $langvars['l_by_noturn'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand All @@ -243,7 +243,7 @@
echo $langvars['l_by_zeroamount'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand All @@ -253,7 +253,7 @@
echo $langvars['l_by_yourself'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand All @@ -263,7 +263,7 @@
echo $langvars['l_by_notenough'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand All @@ -289,7 +289,7 @@
echo $langvars['l_by_toomuch'] . "<br><br>";
Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down Expand Up @@ -399,5 +399,5 @@

Tki\Text::gotoMain($pdo_db, $lang);

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
2 changes: 1 addition & 1 deletion check_mines.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
{
// Or they lose!
Tki\Bounty::cancel($pdo_db, $playerinfo['ship_id']);
$character_object = new Tki\Character;
$character_object = new Tki\Character();
$character_object->kill($pdo_db, $playerinfo['ship_id'], $langvars, $tkireg, false);
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static function logDbErrors(\PDO $pdo_db, $query, int $served_line, strin
{
if ($db_log)
{
$admin_log = new \Tki\AdminLog;
$admin_log = new \Tki\AdminLog();
$admin_log->writeLog($pdo_db, LogEnums::RAW, $text_error);
}
}
Expand Down
4 changes: 2 additions & 2 deletions classes/Game.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public static function isGameClosed(
{
$title = $langvars['l_login_closed_message'];

$header = new \Tki\Header;
$header = new \Tki\Header();
$header->display($pdo_db, $lang, $template, $title);

echo $langvars['l_login_closed_message'];

$footer = new \Tki\Footer;
$footer = new \Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Ibank.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public static function ibankError(\PDO $pdo_db, array $langvars, string $errmsg,
"<img width=600 height=21 src=" . $template . "/images/div2.png>" .
"</center>";

$footer = new \Tki\Footer;
$footer = new \Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Planet.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static function bombing(
echo $langvars['l_cmb_atleastoneturn'] . "<br><br>";
\Tki\Text::gotoMain($pdo_db, $lang);

$footer = new \Tki\Footer;
$footer = new \Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
throw new \Exception();
}
Expand Down
2 changes: 1 addition & 1 deletion classes/PlanetCombat.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function prime(\PDO $pdo_db, $db, string $lang, array $langvars, R
echo $langvars['l_cmb_atleastoneturn'] . "<br><br>";
\Tki\Text::gotoMain($pdo_db, $lang);

$footer = new \Tki\Footer;
$footer = new \Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down
8 changes: 4 additions & 4 deletions classes/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ public static function auth(\PDO $pdo_db, string $lang, array $langvars, Reg $tk
$error_status .= str_replace('[here]', "<a href='index.php'>" . $langvars['l_here'] . '</a>', $langvars['l_global_needlogin']);
$title = $langvars['l_error'];

$header = new \Tki\Header;
$header = new \Tki\Header();
$header->display($pdo_db, $lang, $template, $title);

echo $error_status;

$footer = new \Tki\Footer;
$footer = new \Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down Expand Up @@ -143,11 +143,11 @@ public static function ban(\PDO $pdo_db, string $lang, array $timestamp, Smarty

$title = $langvars['l_error'];

$header = new \Tki\Header;
$header = new \Tki\Header();
$header->display($pdo_db, $lang, $template, $title);
echo $error_status;

$footer = new \Tki\Footer;
$footer = new \Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down
4 changes: 2 additions & 2 deletions classes/Ship.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public static function isDestroyed(\PDO $pdo_db, string $lang, Reg $tkireg, arra
$langvars['l_logout'] . '</a>', $langvars['l_die_please']);
$title = $langvars['l_error'];

$header = new \Tki\Header;
$header = new \Tki\Header();
$header->display($pdo_db, $lang, $template, $title);

echo $error_status;

$footer = new \Tki\Footer;
$footer = new \Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down
4 changes: 2 additions & 2 deletions classes/Team.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function isTeamMember(int $team, array $playerinfo) : bool

// Check to see if the player is a member of $team['id'] if so return true, else return false.
$returnvalue = ($playerinfo['team'] == $team['id']);
return (bool) $returnvalue;
return $returnvalue;
}

public static function isTeamOwner(int $team, array $playerinfo) : bool
Expand All @@ -56,7 +56,7 @@ public static function isTeamOwner(int $team, array $playerinfo) : bool

// Check to see if the player is the Owner of $team['creator'] if so return true, else return false.
$returnvalue = ($playerinfo['ship_id'] == $team['creator']);
return (bool) $returnvalue;
return $returnvalue;
}

public static function validateTeam(\PDO $pdo_db, $name = null, $desc = null, $creator = null) : bool
Expand Down
2 changes: 1 addition & 1 deletion classes/TraderouteBuildNew.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public static function new(\PDO $pdo_db, $db, string $lang, Reg $tkireg, Smarty
\Tki\Text::gotoMain($pdo_db, $lang);
echo "</div>\n";

$footer = new \Tki\Footer;
$footer = new \Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down
2 changes: 1 addition & 1 deletion classes/TraderouteDie.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function die(
\Tki\Text::gotoMain($pdo_db, $lang);
echo "</div>\n";

$footer = new \Tki\Footer;
$footer = new \Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
die();
}
Expand Down
2 changes: 1 addition & 1 deletion common.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
if ($pdo_db !== null)
{
$tkireg = new Tki\Reg($pdo_db); // TKI Registry object - passing config variables via classes
$tkireg->tkitimer = new Tki\Timer; // Create a benchmark timer to get benchmarking data for everything
$tkireg->tkitimer = new Tki\Timer(); // Create a benchmark timer to get benchmarking data for everything
$tkireg->tkitimer->start(); // Start benchmarking immediately
}

Expand Down
4 changes: 2 additions & 2 deletions copyright.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
// Temporarily set the template to the default template until we have a user option
$variables['template'] = $tkireg->default_template;

$header = new Tki\Header;
$header = new Tki\Header();
$header->display($pdo_db, $lang, $template, $variables['title'], $variables['body_class']);

$template->addVariables('langvars', $langvars);
$template->addVariables('variables', $variables);
$template->display('copyright.tpl');

$footer = new Tki\Footer;
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
2 changes: 1 addition & 1 deletion create_universe.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
$variables['goodpass'] = true;

// Determine current step, next step, and number of steps
$step_finder = new Tki\BigBang;
$step_finder = new Tki\BigBang();
$create_universe_info = $step_finder->findStep('');
natsort($create_universe_info['files']);
$loader_file = $create_universe_info['files'][$step];
Expand Down
Loading

0 comments on commit 56d07bb

Please sign in to comment.