Skip to content

Commit 2cb55e8

Browse files
committed
uses Nette\SmartObject & StaticClass
1 parent 2badefd commit 2cb55e8

18 files changed

+51
-18
lines changed

src/Bridges/DatabaseTracy/ConnectionPanel.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
/**
1616
* Debug panel for Nette\Database.
1717
*/
18-
class ConnectionPanel extends Nette\Object implements Tracy\IBarPanel
18+
class ConnectionPanel implements Tracy\IBarPanel
1919
{
20+
use Nette\SmartObject;
21+
2022
/** @var int */
2123
public $maxQueries = 100;
2224

src/Database/Connection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
/**
1616
* Represents a connection between PHP and a database server.
1717
*/
18-
class Connection extends Nette\Object
18+
class Connection
1919
{
20+
use Nette\SmartObject;
21+
2022
/** @var callable[] function (Connection $connection); Occurs after connection is established */
2123
public $onConnect;
2224

src/Database/Context.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
/**
1515
* Database context.
1616
*/
17-
class Context extends Nette\Object
17+
class Context
1818
{
19+
use Nette\SmartObject;
20+
1921
/** @var Connection */
2022
private $connection;
2123

src/Database/Conventions/StaticConventions.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77

88
namespace Nette\Database\Conventions;
99

10+
use Nette;
1011
use Nette\Database\IConventions;
11-
use Nette\Object;
1212

1313

1414
/**
1515
* Conventions based on static definition.
1616
*/
17-
class StaticConventions extends Object implements IConventions
17+
class StaticConventions implements IConventions
1818
{
19+
use Nette\SmartObject;
20+
1921
/** @var string */
2022
protected $primary;
2123

src/Database/Drivers/MsSqlDriver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
/**
1414
* Supplemental MS SQL database driver.
1515
*/
16-
class MsSqlDriver extends Nette\Object implements Nette\Database\ISupplementalDriver
16+
class MsSqlDriver implements Nette\Database\ISupplementalDriver
1717
{
18+
use Nette\SmartObject;
1819

1920
public function convertException(\PDOException $e)
2021
{

src/Database/Drivers/MySqlDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* Supplemental MySQL database driver.
1515
*/
16-
class MySqlDriver extends Nette\Object implements Nette\Database\ISupplementalDriver
16+
class MySqlDriver implements Nette\Database\ISupplementalDriver
1717
{
18+
use Nette\SmartObject;
19+
1820
const ERROR_ACCESS_DENIED = 1045;
1921
const ERROR_DUPLICATE_ENTRY = 1062;
2022
const ERROR_DATA_TRUNCATED = 1265;

src/Database/Drivers/OciDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* Supplemental Oracle database driver.
1515
*/
16-
class OciDriver extends Nette\Object implements Nette\Database\ISupplementalDriver
16+
class OciDriver implements Nette\Database\ISupplementalDriver
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @var Nette\Database\Connection */
1921
private $connection;
2022

src/Database/Drivers/OdbcDriver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
/**
1414
* Supplemental ODBC database driver.
1515
*/
16-
class OdbcDriver extends Nette\Object implements Nette\Database\ISupplementalDriver
16+
class OdbcDriver implements Nette\Database\ISupplementalDriver
1717
{
18+
use Nette\SmartObject;
1819

1920
public function convertException(\PDOException $e)
2021
{

src/Database/Drivers/PgSqlDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* Supplemental PostgreSQL database driver.
1515
*/
16-
class PgSqlDriver extends Nette\Object implements Nette\Database\ISupplementalDriver
16+
class PgSqlDriver implements Nette\Database\ISupplementalDriver
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @var Nette\Database\Connection */
1921
private $connection;
2022

src/Database/Drivers/SqliteDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* Supplemental SQLite3 database driver.
1515
*/
16-
class SqliteDriver extends Nette\Object implements Nette\Database\ISupplementalDriver
16+
class SqliteDriver implements Nette\Database\ISupplementalDriver
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @var Nette\Database\Connection */
1921
private $connection;
2022

src/Database/Drivers/SqlsrvDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* Supplemental SQL Server 2005 and later database driver.
1515
*/
16-
class SqlsrvDriver extends Nette\Object implements Nette\Database\ISupplementalDriver
16+
class SqlsrvDriver implements Nette\Database\ISupplementalDriver
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @var Nette\Database\Connection */
1921
private $connection;
2022

src/Database/Helpers.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*/
1717
class Helpers
1818
{
19+
use Nette\StaticClass;
20+
1921
/** @var int maximum SQL length */
2022
public static $maxLength = 100;
2123

src/Database/ResultSet.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
/**
1515
* Represents a result set.
1616
*/
17-
class ResultSet extends Nette\Object implements \Iterator, IRowContainer
17+
class ResultSet implements \Iterator, IRowContainer
1818
{
19+
use Nette\SmartObject;
20+
1921
/** @var Connection */
2022
private $connection;
2123

src/Database/SqlLiteral.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* SQL literal value.
1515
*/
16-
class SqlLiteral extends Nette\Object
16+
class SqlLiteral
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @var string */
1921
private $value;
2022

src/Database/SqlPreprocessor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* SQL preprocessor.
1515
*/
16-
class SqlPreprocessor extends Nette\Object
16+
class SqlPreprocessor
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @var Connection */
1921
private $connection;
2022

src/Database/Structure.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
/**
1414
* Cached reflection of database structure.
1515
*/
16-
class Structure extends Nette\Object implements IStructure
16+
class Structure implements IStructure
1717
{
18+
use Nette\SmartObject;
19+
1820
/** @var Connection */
1921
protected $connection;
2022

src/Database/Table/Selection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
* Filtered table representation.
1717
* Selection is based on the great library NotORM http://www.notorm.com written by Jakub Vrana.
1818
*/
19-
class Selection extends Nette\Object implements \Iterator, IRowContainer, \ArrayAccess, \Countable
19+
class Selection implements \Iterator, IRowContainer, \ArrayAccess, \Countable
2020
{
21+
use Nette\SmartObject;
22+
2123
/** @var Context */
2224
protected $context;
2325

src/Database/Table/SqlBuilder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
* Builds SQL query.
2020
* SqlBuilder is based on great library NotORM http://www.notorm.com written by Jakub Vrana.
2121
*/
22-
class SqlBuilder extends Nette\Object
22+
class SqlBuilder
2323
{
24+
use Nette\SmartObject;
2425

2526
/** @var string */
2627
protected $tableName;

0 commit comments

Comments
 (0)