mirror of
https://github.com/dg/dibi.git
synced 2025-08-30 01:09:50 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1809885d30 | ||
|
e1256eca87 | ||
|
f26bb27504 |
@@ -33,12 +33,12 @@ jobs:
|
||||
php: 7.1
|
||||
install:
|
||||
# Install Nette Code Checker
|
||||
- travis_retry composer create-project nette/code-checker temp/code-checker ~2 --no-progress
|
||||
- travis_retry composer create-project nette/code-checker temp/code-checker ^3 --no-progress
|
||||
# Install Nette Coding Standard
|
||||
- travis_retry composer create-project nette/coding-standard temp/coding-standard --no-progress
|
||||
- travis_retry composer create-project nette/coding-standard temp/coding-standard ^2 --no-progress
|
||||
script:
|
||||
- php temp/code-checker/src/code-checker.php --short-arrays
|
||||
- php temp/coding-standard/ecs check src tests examples --config temp/coding-standard/coding-standard-php56.neon
|
||||
- php temp/code-checker/code-checker
|
||||
- php temp/coding-standard/ecs check src tests examples --config temp/coding-standard/coding-standard-php56.yml
|
||||
|
||||
|
||||
- stage: Code Coverage
|
||||
|
@@ -22,7 +22,7 @@ class DateTime extends \DateTime
|
||||
{
|
||||
if (is_numeric($time)) {
|
||||
parent::__construct('@' . $time);
|
||||
$this->setTimeZone($timezone ? $timezone : new \DateTimeZone(date_default_timezone_get()));
|
||||
$this->setTimeZone($timezone ?: new \DateTimeZone(date_default_timezone_get()));
|
||||
} elseif ($timezone === null) {
|
||||
parent::__construct($time);
|
||||
} else {
|
||||
|
@@ -547,7 +547,7 @@ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
|
||||
|
||||
$res = $this->query($query);
|
||||
$tables = pg_fetch_all($res->resultSet);
|
||||
return $tables ? $tables : [];
|
||||
return $tables ?: [];
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,27 +17,30 @@ spl_autoload_register(function ($class) {
|
||||
'Dibi\Bridges\Nette\DibiExtension22' => 'Bridges/Nette/DibiExtension22.php',
|
||||
'Dibi\Bridges\Tracy\Panel' => 'Bridges/Tracy/Panel.php',
|
||||
'Dibi\Connection' => 'Connection.php',
|
||||
'Dibi\ConstraintViolationException' => 'exceptions.php',
|
||||
'Dibi\DataSource' => 'DataSource.php',
|
||||
'Dibi\DateTime' => 'DateTime.php',
|
||||
'Dibi\Driver' => 'interfaces.php',
|
||||
'Dibi\DriverException' => 'exceptions.php',
|
||||
'Dibi\Drivers\FirebirdDriver' => 'Drivers/FirebirdDriver.php',
|
||||
'Dibi\Drivers\SqlsrvDriver' => 'Drivers/SqlsrvDriver.php',
|
||||
'Dibi\Drivers\SqlsrvReflector' => 'Drivers/SqlsrvReflector.php',
|
||||
'Dibi\Drivers\MsSqlDriver' => 'Drivers/MsSqlDriver.php',
|
||||
'Dibi\Drivers\MsSqlReflector' => 'Drivers/MsSqlReflector.php',
|
||||
'Dibi\Drivers\MySqlDriver' => 'Drivers/MySqlDriver.php',
|
||||
'Dibi\Drivers\MySqliDriver' => 'Drivers/MySqliDriver.php',
|
||||
'Dibi\Drivers\MySqlReflector' => 'Drivers/MySqlReflector.php',
|
||||
'Dibi\Drivers\MySqliDriver' => 'Drivers/MySqliDriver.php',
|
||||
'Dibi\Drivers\OdbcDriver' => 'Drivers/OdbcDriver.php',
|
||||
'Dibi\Drivers\OracleDriver' => 'Drivers/OracleDriver.php',
|
||||
'Dibi\Drivers\PdoDriver' => 'Drivers/PdoDriver.php',
|
||||
'Dibi\Drivers\PostgreDriver' => 'Drivers/PostgreDriver.php',
|
||||
'Dibi\Drivers\Sqlite3Driver' => 'Drivers/Sqlite3Driver.php',
|
||||
'Dibi\Drivers\SqliteReflector' => 'Drivers/SqliteReflector.php',
|
||||
'Dibi\Drivers\SqlsrvDriver' => 'Drivers/SqlsrvDriver.php',
|
||||
'Dibi\Drivers\SqlsrvReflector' => 'Drivers/SqlsrvReflector.php',
|
||||
'Dibi\Event' => 'Event.php',
|
||||
'Dibi\Exception' => 'exceptions.php',
|
||||
'Dibi\Expression' => 'Expression.php',
|
||||
'Dibi\Fluent' => 'Fluent.php',
|
||||
'Dibi\ForeignKeyConstraintViolationException' => 'exceptions.php',
|
||||
'Dibi\HashMap' => 'HashMap.php',
|
||||
'Dibi\HashMapBase' => 'HashMap.php',
|
||||
'Dibi\Helpers' => 'Helpers.php',
|
||||
@@ -46,6 +49,7 @@ spl_autoload_register(function ($class) {
|
||||
'Dibi\Loggers\FileLogger' => 'Loggers/FileLogger.php',
|
||||
'Dibi\Loggers\FirePhpLogger' => 'Loggers/FirePhpLogger.php',
|
||||
'Dibi\NotImplementedException' => 'exceptions.php',
|
||||
'Dibi\NotNullConstraintViolationException' => 'exceptions.php',
|
||||
'Dibi\NotSupportedException' => 'exceptions.php',
|
||||
'Dibi\PcreException' => 'exceptions.php',
|
||||
'Dibi\ProcedureException' => 'exceptions.php',
|
||||
@@ -63,6 +67,7 @@ spl_autoload_register(function ($class) {
|
||||
'Dibi\Strict' => 'Strict.php',
|
||||
'Dibi\Translator' => 'Translator.php',
|
||||
'Dibi\Type' => 'Type.php',
|
||||
'Dibi\UniqueConstraintViolationException' => 'exceptions.php',
|
||||
], $old2new = [
|
||||
'DibiColumnInfo' => 'Dibi\Reflection\Column',
|
||||
'DibiConnection' => 'Dibi\Connection',
|
||||
|
Reference in New Issue
Block a user