Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/db/db_load_balancer.php
Show First 20 Lines • Show All 483 Lines • ▼ Show 20 Line(s) | |||||
* @param bool $is_master | * @param bool $is_master | ||||
* @return kDBConnection | * @return kDBConnection | ||||
*/ | */ | ||||
protected function &reallyOpenConnection($server, $is_master) | protected function &reallyOpenConnection($server, $is_master) | ||||
{ | { | ||||
$debug_mode = $this->Application->isDebugMode(); | $debug_mode = $this->Application->isDebugMode(); | ||||
$db_class = $debug_mode ? 'kDBConnectionDebug' : 'kDBConnection'; | $db_class = $debug_mode ? 'kDBConnectionDebug' : 'kDBConnection'; | ||||
/** @var kDBConnection $db */ | |||||
$db = $this->Application->makeClass($db_class, Array ($this->dbType, $this->errorHandler, $server['serverIndex'])); | $db = $this->Application->makeClass($db_class, Array ($this->dbType, $this->errorHandler, $server['serverIndex'])); | ||||
Lint: Generic.Files.LineLength.TooLong: Line exceeds 120 characters; contains 123 characters | |||||
PHP keywords must be lowercase; expected "array" but found "Array" Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
There must be no space between the Array keyword and the opening parenthesis Lint: CodingStandard.Array.Array.SpaceAfterKeyword: There must be no space between the Array keyword and the opening parenthesis | |||||
/* @var $db kDBConnection */ | |||||
$db->debugMode = $debug_mode; | $db->debugMode = $debug_mode; | ||||
$db->Connect($server['DBHost'], $server['DBUser'], $server['DBUserPassword'], $this->servers[0]['DBName'], !$is_master); | $db->Connect($server['DBHost'], $server['DBUser'], $server['DBUserPassword'], $this->servers[0]['DBName'], !$is_master); | ||||
return $db; | return $db; | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 369 Lines • Show Last 20 Lines |
Line exceeds 120 characters; contains 123 characters