1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-12 09:04:24 +02:00

typos & whitespace

This commit is contained in:
David Grudl
2013-07-02 18:42:55 +02:00
parent 9e23730cb0
commit e87c112d71
55 changed files with 612 additions and 1299 deletions

View File

@@ -20,7 +20,6 @@ if (version_compare(PHP_VERSION, '5.2.0', '<')) {
@set_magic_quotes_runtime(FALSE); // intentionally @
require_once dirname(__FILE__) . '/libs/interfaces.php';
require_once dirname(__FILE__) . '/libs/DibiDateTime.php';
require_once dirname(__FILE__) . '/libs/DibiObject.php';
@@ -43,9 +42,6 @@ if (interface_exists('Nette\Diagnostics\IBarPanel') || interface_exists('IBarPan
}
/**
* Interface for database drivers.
*
@@ -112,7 +108,6 @@ class dibi
public static $defaultDriver = 'mysql';
/**
* Static class - cannot be instantiated.
*/
@@ -122,11 +117,9 @@ class dibi
}
/********************* connections handling ****************d*g**/
/**
* Creates a new DibiConnection object and connects it to specified database.
* @param mixed connection parameters
@@ -140,7 +133,6 @@ class dibi
}
/**
* Disconnects from database (doesn't destroy DibiConnection object).
* @return void
@@ -151,7 +143,6 @@ class dibi
}
/**
* Returns TRUE when connection was established.
* @return bool
@@ -162,7 +153,6 @@ class dibi
}
/**
* Retrieve active connection.
* @param string connection registy name
@@ -187,7 +177,6 @@ class dibi
}
/**
* Sets connection.
* @param DibiConnection
@@ -199,7 +188,6 @@ class dibi
}
/**
* Change active connection.
* @param string connection registy name
@@ -212,11 +200,9 @@ class dibi
}
/********************* monostate for active connection ****************d*g**/
/**
* Generates and executes SQL query - Monostate for DibiConnection::query().
* @param array|mixed one or more arguments
@@ -230,7 +216,6 @@ class dibi
}
/**
* Executes the SQL query - Monostate for DibiConnection::nativeQuery().
* @param string SQL statement.
@@ -242,7 +227,6 @@ class dibi
}
/**
* Generates and prints SQL query - Monostate for DibiConnection::test().
* @param array|mixed one or more arguments
@@ -255,7 +239,6 @@ class dibi
}
/**
* Generates and returns SQL query as DibiDataSource - Monostate for DibiConnection::test().
* @param array|mixed one or more arguments
@@ -268,7 +251,6 @@ class dibi
}
/**
* Executes SQL query and fetch result - Monostate for DibiConnection::query() & fetch().
* @param array|mixed one or more arguments
@@ -282,7 +264,6 @@ class dibi
}
/**
* Executes SQL query and fetch results - Monostate for DibiConnection::query() & fetchAll().
* @param array|mixed one or more arguments
@@ -296,7 +277,6 @@ class dibi
}
/**
* Executes SQL query and fetch first column - Monostate for DibiConnection::query() & fetchSingle().
* @param array|mixed one or more arguments
@@ -310,7 +290,6 @@ class dibi
}
/**
* Executes SQL query and fetch pairs - Monostate for DibiConnection::query() & fetchPairs().
* @param array|mixed one or more arguments
@@ -324,7 +303,6 @@ class dibi
}
/**
* Gets the number of affected rows.
* Monostate for DibiConnection::getAffectedRows()
@@ -337,7 +315,6 @@ class dibi
}
/**
* Gets the number of affected rows. Alias for getAffectedRows().
* @return int number of rows
@@ -349,7 +326,6 @@ class dibi
}
/**
* Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
* Monostate for DibiConnection::getInsertId()
@@ -363,7 +339,6 @@ class dibi
}
/**
* Retrieves the ID generated for an AUTO_INCREMENT column. Alias for getInsertId().
* @param string optional sequence name
@@ -376,7 +351,6 @@ class dibi
}
/**
* Begins a transaction - Monostate for DibiConnection::begin().
* @param string optional savepoint name
@@ -389,7 +363,6 @@ class dibi
}
/**
* Commits statements in a transaction - Monostate for DibiConnection::commit($savepoint = NULL).
* @param string optional savepoint name
@@ -402,7 +375,6 @@ class dibi
}
/**
* Rollback changes in a transaction - Monostate for DibiConnection::rollback().
* @param string optional savepoint name
@@ -415,7 +387,6 @@ class dibi
}
/**
* Gets a information about the current database - Monostate for DibiConnection::getDatabaseInfo().
* @return DibiDatabaseInfo
@@ -426,7 +397,6 @@ class dibi
}
/**
* Import SQL dump from file - extreme fast!
* @param string filename
@@ -438,24 +408,21 @@ class dibi
}
/**
* Replacement for majority of dibi::methods() in future.
*/
public static function __callStatic($name, $args)
{
//if ($name = 'select', 'update', ...') {
// return self::command()->$name($args);
// return self::command()->$name($args);
//}
return call_user_func_array(array(self::getConnection(), $name), $args);
}
/********************* fluent SQL builders ****************d*g**/
/**
* @return DibiFluent
*/
@@ -465,7 +432,6 @@ class dibi
}
/**
* @param string column name
* @return DibiFluent
@@ -477,7 +443,6 @@ class dibi
}
/**
* @param string table
* @param array
@@ -489,7 +454,6 @@ class dibi
}
/**
* @param string table
* @param array
@@ -501,7 +465,6 @@ class dibi
}
/**
* @param string table
* @return DibiFluent
@@ -512,11 +475,9 @@ class dibi
}
/********************* data types ****************d*g**/
/**
* @return DibiDateTime
*/
@@ -527,7 +488,6 @@ class dibi
}
/**
* @deprecated
*/
@@ -538,11 +498,9 @@ class dibi
}
/********************* substitutions ****************d*g**/
/**
* Returns substitution hashmap - Monostate for DibiConnection::getSubstitutes().
* @return DibiHashMap
@@ -553,7 +511,6 @@ class dibi
}
/** @deprecated */
public static function addSubst($expr, $subst)
{
@@ -562,7 +519,6 @@ class dibi
}
/** @deprecated */
public static function removeSubst($expr)
{
@@ -578,7 +534,6 @@ class dibi
}
/** @deprecated */
public static function setSubstFallback($callback)
{
@@ -587,11 +542,9 @@ class dibi
}
/********************* misc tools ****************d*g**/
/**
* Prints out a syntax highlighted version of the SQL command or DibiResult.
* @param string|DibiResult
@@ -605,7 +558,9 @@ class dibi
$sql->dump();
} else {
if ($sql === NULL) $sql = self::$sql;
if ($sql === NULL) {
$sql = self::$sql;
}
static $keywords1 = 'SELECT|(?:ON\s+DUPLICATE\s+KEY)?UPDATE|INSERT(?:\s+INTO)?|REPLACE(?:\s+INTO)?|DELETE|CALL|UNION|FROM|WHERE|HAVING|GROUP\s+BY|ORDER\s+BY|LIMIT|OFFSET|SET|VALUES|LEFT\s+JOIN|INNER\s+JOIN|TRUNCATE';
static $keywords2 = 'ALL|DISTINCT|DISTINCTROW|IGNORE|AS|USING|ON|AND|OR|IN|IS|NOT|NULL|LIKE|RLIKE|REGEXP|TRUE|FALSE';
@@ -643,7 +598,6 @@ class dibi
}
private static function highlightCallback($matches)
{
if (!empty($matches[1])) { // comment
@@ -661,7 +615,6 @@ class dibi
}
private static function cliHighlightCallback($matches)
{
if (!empty($matches[1])) { // comment