mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 21:28:02 +02:00
coding style: fixed spaces & use statements order
This commit is contained in:
@@ -38,6 +38,7 @@ function substFallBack($expr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// define callback
|
||||
dibi::getSubstitutes()->setCallback('substFallBack');
|
||||
|
||||
|
@@ -68,5 +68,4 @@ class DibiExtension22 extends Nette\DI\CompilerExtension
|
||||
$connection->addSetup([$panel, 'register'], [$connection]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -151,5 +151,4 @@ class Panel implements Tracy\IBarPanel
|
||||
</table>
|
||||
</div>';
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@ class Connection
|
||||
* - run (bool) => enable profiler?
|
||||
* - file => file to log
|
||||
* - substitutes (array) => map of driver specific substitutes (under development)
|
||||
|
||||
|
||||
* @param mixed connection parameters
|
||||
* @param string connection name
|
||||
* @throws Exception
|
||||
@@ -658,5 +658,4 @@ class Connection
|
||||
call_user_func($handler, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -305,5 +305,4 @@ FROM %SQL', $this->sql, '
|
||||
}
|
||||
return $this->totalCount;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -71,5 +71,4 @@ class DateTime extends \DateTime
|
||||
parent::__wakeup();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -834,5 +834,4 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
||||
}
|
||||
return $functions;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -406,5 +406,4 @@ class MsSqlDriver implements Dibi\Driver, Dibi\ResultDriver
|
||||
$this->autoFree = FALSE;
|
||||
return is_resource($this->resultSet) ? $this->resultSet : NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -212,5 +212,4 @@ class MsSqlReflector implements Dibi\Reflector
|
||||
}
|
||||
return array_values($keys);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -499,5 +499,4 @@ class MySqlDriver implements Dibi\Driver, Dibi\ResultDriver
|
||||
$this->autoFree = FALSE;
|
||||
return is_resource($this->resultSet) ? $this->resultSet : NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -131,5 +131,4 @@ class MySqlReflector implements Dibi\Reflector
|
||||
}
|
||||
return array_values($foreignKeys);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -518,5 +518,4 @@ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver
|
||||
$this->autoFree = FALSE;
|
||||
return $this->resultSet;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -516,5 +516,4 @@ class OdbcDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
||||
{
|
||||
throw new Dibi\NotImplementedException;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -536,5 +536,4 @@ class OracleDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
||||
{
|
||||
throw new Dibi\NotImplementedException;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -577,5 +577,4 @@ class PdoDriver implements Dibi\Driver, Dibi\ResultDriver
|
||||
{
|
||||
return $this->resultSet;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -740,5 +740,4 @@ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
||||
|
||||
return $fKeys;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -492,5 +492,4 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
|
||||
{
|
||||
$this->connection->createAggregate($name, $rowCallback, $agrCallback, $numArgs);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -150,5 +150,4 @@ class SqliteReflector implements Dibi\Reflector
|
||||
}
|
||||
return array_values($keys);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -436,5 +436,4 @@ class SqlsrvDriver implements Dibi\Driver, Dibi\ResultDriver
|
||||
$this->autoFree = FALSE;
|
||||
return is_resource($this->resultSet) ? $this->resultSet : NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -132,5 +132,4 @@ class SqlsrvReflector implements Dibi\Reflector
|
||||
{
|
||||
throw new Dibi\NotImplementedException;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -94,5 +94,4 @@ class Event
|
||||
\dibi::$totalTime += $this->time;
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -517,5 +517,4 @@ class Fluent implements IDataSource
|
||||
}
|
||||
$this->cursor = &$foo;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -33,7 +33,6 @@ abstract class HashMapBase
|
||||
{
|
||||
return $this->callback;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +43,6 @@ abstract class HashMapBase
|
||||
*/
|
||||
final class HashMap extends HashMapBase
|
||||
{
|
||||
|
||||
public function __set($nm, $val)
|
||||
{
|
||||
if ($nm == '') {
|
||||
@@ -63,5 +61,4 @@ final class HashMap extends HashMapBase
|
||||
return $this->$nm = call_user_func($this->getCallback(), $nm);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -15,6 +15,7 @@ class Helpers
|
||||
/** @var array */
|
||||
private static $types;
|
||||
|
||||
|
||||
/**
|
||||
* Prints out a syntax highlighted version of the SQL command or Result.
|
||||
* @param string|Result
|
||||
@@ -281,5 +282,4 @@ class Helpers
|
||||
fclose($handle);
|
||||
return $count;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -32,5 +32,4 @@ class Literal
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -72,5 +72,4 @@ class FileLogger
|
||||
}
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -91,5 +91,4 @@ class FirePhpLogger
|
||||
}
|
||||
header("X-Wf-dibi-1-1-d$num: |$s|");
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -162,5 +162,4 @@ class Column
|
||||
{
|
||||
return isset($this->info['vendor'][$key]) ? $this->info['vendor'][$key] : NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -111,5 +111,4 @@ class Database
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -50,5 +50,4 @@ class ForeignKey
|
||||
{
|
||||
return $this->references;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -66,5 +66,4 @@ class Index
|
||||
{
|
||||
return !empty($this->info['primary']);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -102,5 +102,4 @@ class Result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -197,5 +197,4 @@ class Table
|
||||
{
|
||||
throw new Dibi\NotImplementedException;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -319,7 +319,6 @@ class Result implements IDataSource
|
||||
if ($x === NULL) { // build leaf
|
||||
$x = $row;
|
||||
}
|
||||
|
||||
} while ($row = $this->fetch());
|
||||
|
||||
unset($x);
|
||||
@@ -392,7 +391,6 @@ class Result implements IDataSource
|
||||
$x = $row;
|
||||
}
|
||||
}
|
||||
|
||||
} while ($row = $this->fetch());
|
||||
|
||||
unset($x);
|
||||
@@ -616,5 +614,4 @@ class Result implements IDataSource
|
||||
{
|
||||
echo Helpers::dump($this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -104,5 +104,4 @@ class ResultIterator implements \Iterator, \Countable
|
||||
{
|
||||
return $this->result->getRowCount();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -13,7 +13,6 @@ namespace Dibi;
|
||||
*/
|
||||
class Row implements \ArrayAccess, \IteratorAggregate, \Countable
|
||||
{
|
||||
|
||||
public function __construct($arr)
|
||||
{
|
||||
foreach ($arr as $k => $v) {
|
||||
@@ -91,5 +90,4 @@ class Row implements \ArrayAccess, \IteratorAggregate, \Countable
|
||||
{
|
||||
unset($this->$nm);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -148,5 +148,4 @@ trait Strict
|
||||
$list[''] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -607,5 +607,4 @@ final class Translator
|
||||
}
|
||||
return implode('.', $parts);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -24,9 +24,9 @@ class Type
|
||||
TIME = 't',
|
||||
TIME_INTERVAL = 'ti';
|
||||
|
||||
|
||||
final public function __construct()
|
||||
{
|
||||
throw new \LogicException('Cannot instantiate static class ' . __CLASS__);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -450,5 +450,4 @@ class dibi
|
||||
{
|
||||
return Dibi\Helpers::dump($sql, $return);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -47,7 +47,6 @@ class Exception extends \Exception
|
||||
{
|
||||
return parent::__toString() . ($this->sql ? "\nSQL: " . $this->sql : '');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +63,6 @@ class DriverException extends Exception
|
||||
*/
|
||||
class PcreException extends Exception
|
||||
{
|
||||
|
||||
public function __construct($message = '%msg.')
|
||||
{
|
||||
static $messages = [
|
||||
@@ -120,7 +118,6 @@ class ProcedureException extends Exception
|
||||
{
|
||||
$this->severity;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -148,7 +148,6 @@ interface Driver
|
||||
* @return void
|
||||
*/
|
||||
function applyLimit(&$sql, $limit, $offset);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +204,6 @@ interface ResultDriver
|
||||
* @return string
|
||||
*/
|
||||
function unescapeBinary($value);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -241,5 +239,4 @@ interface Reflector
|
||||
* @return array
|
||||
*/
|
||||
function getForeignKeys($table);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user