1
0
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:
David Grudl
2017-07-21 22:25:33 +02:00
parent e45a86d58c
commit b439ee9df1
42 changed files with 4 additions and 51 deletions

View File

@@ -38,6 +38,7 @@ function substFallBack($expr)
}
}
// define callback
dibi::getSubstitutes()->setCallback('substFallBack');

View File

@@ -68,5 +68,4 @@ class DibiExtension22 extends Nette\DI\CompilerExtension
$connection->addSetup([$panel, 'register'], [$connection]);
}
}
}

View File

@@ -151,5 +151,4 @@ class Panel implements Tracy\IBarPanel
</table>
</div>';
}
}

View File

@@ -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);
}
}
}

View File

@@ -305,5 +305,4 @@ FROM %SQL', $this->sql, '
}
return $this->totalCount;
}
}

View File

@@ -71,5 +71,4 @@ class DateTime extends \DateTime
parent::__wakeup();
}
}
}

View File

@@ -834,5 +834,4 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
}
return $functions;
}
}

View File

@@ -406,5 +406,4 @@ class MsSqlDriver implements Dibi\Driver, Dibi\ResultDriver
$this->autoFree = FALSE;
return is_resource($this->resultSet) ? $this->resultSet : NULL;
}
}

View File

@@ -212,5 +212,4 @@ class MsSqlReflector implements Dibi\Reflector
}
return array_values($keys);
}
}

View File

@@ -499,5 +499,4 @@ class MySqlDriver implements Dibi\Driver, Dibi\ResultDriver
$this->autoFree = FALSE;
return is_resource($this->resultSet) ? $this->resultSet : NULL;
}
}

View File

@@ -131,5 +131,4 @@ class MySqlReflector implements Dibi\Reflector
}
return array_values($foreignKeys);
}
}

View File

@@ -518,5 +518,4 @@ class MySqliDriver implements Dibi\Driver, Dibi\ResultDriver
$this->autoFree = FALSE;
return $this->resultSet;
}
}

View File

@@ -516,5 +516,4 @@ class OdbcDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
{
throw new Dibi\NotImplementedException;
}
}

View File

@@ -536,5 +536,4 @@ class OracleDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
{
throw new Dibi\NotImplementedException;
}
}

View File

@@ -577,5 +577,4 @@ class PdoDriver implements Dibi\Driver, Dibi\ResultDriver
{
return $this->resultSet;
}
}

View File

@@ -740,5 +740,4 @@ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
return $fKeys;
}
}

View File

@@ -492,5 +492,4 @@ class Sqlite3Driver implements Dibi\Driver, Dibi\ResultDriver
{
$this->connection->createAggregate($name, $rowCallback, $agrCallback, $numArgs);
}
}

View File

@@ -150,5 +150,4 @@ class SqliteReflector implements Dibi\Reflector
}
return array_values($keys);
}
}

View File

@@ -436,5 +436,4 @@ class SqlsrvDriver implements Dibi\Driver, Dibi\ResultDriver
$this->autoFree = FALSE;
return is_resource($this->resultSet) ? $this->resultSet : NULL;
}
}

View File

@@ -132,5 +132,4 @@ class SqlsrvReflector implements Dibi\Reflector
{
throw new Dibi\NotImplementedException;
}
}

View File

@@ -94,5 +94,4 @@ class Event
\dibi::$totalTime += $this->time;
return $this;
}
}

View File

@@ -517,5 +517,4 @@ class Fluent implements IDataSource
}
$this->cursor = &$foo;
}
}

View File

@@ -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);
}
}
}

View File

@@ -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;
}
}

View File

@@ -32,5 +32,4 @@ class Literal
{
return $this->value;
}
}

View File

@@ -72,5 +72,4 @@ class FileLogger
}
fclose($handle);
}
}

View File

@@ -91,5 +91,4 @@ class FirePhpLogger
}
header("X-Wf-dibi-1-1-d$num: |$s|");
}
}

View File

@@ -162,5 +162,4 @@ class Column
{
return isset($this->info['vendor'][$key]) ? $this->info['vendor'][$key] : NULL;
}
}

View File

@@ -111,5 +111,4 @@ class Database
}
}
}
}

View File

@@ -50,5 +50,4 @@ class ForeignKey
{
return $this->references;
}
}

View File

@@ -66,5 +66,4 @@ class Index
{
return !empty($this->info['primary']);
}
}

View File

@@ -102,5 +102,4 @@ class Result
}
}
}
}

View File

@@ -197,5 +197,4 @@ class Table
{
throw new Dibi\NotImplementedException;
}
}

View File

@@ -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);
}
}

View File

@@ -104,5 +104,4 @@ class ResultIterator implements \Iterator, \Countable
{
return $this->result->getRowCount();
}
}

View File

@@ -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);
}
}

View File

@@ -148,5 +148,4 @@ trait Strict
$list[''] = NULL;
}
}
}

View File

@@ -607,5 +607,4 @@ final class Translator
}
return implode('.', $parts);
}
}

View File

@@ -24,9 +24,9 @@ class Type
TIME = 't',
TIME_INTERVAL = 'ti';
final public function __construct()
{
throw new \LogicException('Cannot instantiate static class ' . __CLASS__);
}
}

View File

@@ -450,5 +450,4 @@ class dibi
{
return Dibi\Helpers::dump($sql, $return);
}
}

View File

@@ -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;
}
}

View File

@@ -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);
}