From 0a64edd4534d1eaa86b2c3973a57ad4df173b103 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Tue, 22 Apr 2014 14:02:54 -0400 Subject: [PATCH] Fix some typos and docblocks --- core/abstract/abstract_driver.php | 9 +- core/connection_manager.php | 11 +- core/interfaces/driver_interface.php | 240 ++++++++++++++++----------- core/interfaces/sql_interface.php | 4 +- core/query_builder.php | 16 +- core/table_builder.php | 12 +- drivers/firebird/firebird_driver.php | 6 +- 7 files changed, 178 insertions(+), 120 deletions(-) diff --git a/core/abstract/abstract_driver.php b/core/abstract/abstract_driver.php index f6d0d5d..8cee9f9 100644 --- a/core/abstract/abstract_driver.php +++ b/core/abstract/abstract_driver.php @@ -31,7 +31,7 @@ abstract class Abstract_Driver extends \PDO implements Driver_Interface { /** * Reference to the last executed query - * @var PDOStatement + * @var \PDOStatement */ protected $statement; @@ -49,7 +49,7 @@ abstract class Abstract_Driver extends \PDO implements Driver_Interface { /** * Reference to util class - * @var DB_Util + * @var Abstract_Util */ public $util; @@ -102,6 +102,7 @@ abstract class Abstract_Driver extends \PDO implements Driver_Interface { * * @param string $name * @param array $args + * @return mixed */ public function __call($name, $args = array()) { @@ -415,7 +416,7 @@ abstract class Abstract_Driver extends \PDO implements Driver_Interface { // ------------------------------------------------------------------------- /** - * Retreives an array of non-user-created tables for + * Retrieves an array of non-user-created tables for * the connection/database * * @return array @@ -479,7 +480,7 @@ abstract class Abstract_Driver extends \PDO implements Driver_Interface { // ------------------------------------------------------------------------- /** - * Method to simplify retreiving db results for meta-data queries + * Method to simplify retrieving db results for meta-data queries * * @param string|array|null $query * @param bool $filtered_index diff --git a/core/connection_manager.php b/core/connection_manager.php index 2c8133a..cb5e300 100644 --- a/core/connection_manager.php +++ b/core/connection_manager.php @@ -65,9 +65,9 @@ final class Connection_Manager { // -------------------------------------------------------------------------- /** - * Make sure serialize/deseriaze doesn't work + * Make sure serialize/deserialize doesn't work * @codeCoverageIgnore - * @throws DomainException + * @throws \DomainException */ private function __wakeup() { @@ -102,11 +102,11 @@ final class Connection_Manager { * * @param string|array|object $name * @return Query_Builder - * @throws InvalidArgumentException + * @throws \InvalidArgumentException */ public function get_connection($name = '') { - // If the paramater is a string, use it as an array index + // If the parameter is a string, use it as an array index if (is_scalar($name) && isset($this->connections[$name])) { return $this->connections[$name]; @@ -169,6 +169,7 @@ final class Connection_Manager { * Parses params into a dsn and option array * * @param \ArrayObject $params + * @return array * @throws BadDBDriverException */ private function parse_params(\ArrayObject $params) @@ -177,7 +178,7 @@ final class Connection_Manager { $dbtype = ($params->type !== 'postgresql') ? $params->type : 'pgsql'; // Make sure the class exists - if ( ! class_exists("Query\\Driver\\$dbtype")) + if ( ! class_exists("Query\\Driver\\{$dbtype}")) { throw new BadDBDriverException('Database driver does not exist, or is not supported'); } diff --git a/core/interfaces/driver_interface.php b/core/interfaces/driver_interface.php index 98e5788..df5aef9 100644 --- a/core/interfaces/driver_interface.php +++ b/core/interfaces/driver_interface.php @@ -1,96 +1,144 @@ -get_driver()->get_fks($this->name); + + foreach($keys as $key) + { + + } + + return FALSE; } // -------------------------------------------------------------------------- @@ -363,7 +371,7 @@ class Table_Builder { */ public function get_columns() { - return $this->driver->get_columns($this->prefix_table($this->name)); + return $this->driver->get_columns($this->name); } @@ -430,4 +438,4 @@ class Table_Builder { } } -// End of table_bulider.php +// End of table_builder.php diff --git a/drivers/firebird/firebird_driver.php b/drivers/firebird/firebird_driver.php index 213799c..c241c6e 100644 --- a/drivers/firebird/firebird_driver.php +++ b/drivers/firebird/firebird_driver.php @@ -72,6 +72,8 @@ class Firebird extends Abstract_Driver { * @param string $user * @param string $pass * @param array $options + * @throws \PDOException + * @return void */ public function __construct($dbpath, $user='SYSDBA', $pass='masterkey', array $options = array()) { @@ -226,7 +228,7 @@ class Firebird extends Abstract_Driver { * @param string $query * @param array $options * @return Firebird_Result - * @throws PDOException + * @throws \PDOException */ public function prepare($query, $options=array()) { @@ -355,7 +357,7 @@ class Firebird extends Abstract_Driver { */ public function errorCode() { - return fbird_errcode(); + return \fbird_errcode(); } // --------------------------------------------------------------------------