From c5536aac5752054f7f76e448d58b86407d8f574e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Nov 2012 17:33:58 +0200 Subject: Manually apply PR #1594 (fixing phpdoc page-level generation/warnings) Also partially fixes issue #1295, fixes inconsistencies in some page-level docblocks and adds include checks in language files. --- system/database/DB.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system/database/DB.php') diff --git a/system/database/DB.php b/system/database/DB.php index d751325ce..676cb9ccd 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -1,4 +1,4 @@ - Date: Fri, 2 Nov 2012 01:42:31 +0200 Subject: DocBlocks for base DB classes Partially fixes issue #1295. --- system/database/DB.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'system/database/DB.php') diff --git a/system/database/DB.php b/system/database/DB.php index 676cb9ccd..79e5c7ad2 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -32,8 +32,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @category Database * @author EllisLab Dev Team * @link http://codeigniter.com/user_guide/database/ - * @param string - * @param bool Determines if query builder should be used or not + * + * @param string|string[] $params + * @param bool $query_builder_override + * Determines if query builder should be used or not */ function &DB($params = '', $query_builder_override = NULL) { @@ -149,11 +151,22 @@ function &DB($params = '', $query_builder_override = NULL) require_once(BASEPATH.'database/DB_query_builder.php'); if ( ! class_exists('CI_DB')) { + /** + * CI_DB + * + * Acts as an alias for both CI_DB_driver and CI_DB_query_builder. + * + * @see CI_DB_query_builder + * @see CI_DB_driver + */ class CI_DB extends CI_DB_query_builder { } } } elseif ( ! class_exists('CI_DB')) { + /** + * @ignore + */ class CI_DB extends CI_DB_driver { } } -- cgit v1.2.3-24-g4f1b From d008c9783d4d3f271cabc11af290d5e0203697e5 Mon Sep 17 00:00:00 2001 From: vkeranov Date: Mon, 12 Nov 2012 14:29:49 +0200 Subject: Let's follow the style guide... --- system/database/DB.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'system/database/DB.php') diff --git a/system/database/DB.php b/system/database/DB.php index 79e5c7ad2..f4062fa73 100644 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -50,18 +50,18 @@ function &DB($params = '', $query_builder_override = NULL) } include($file_path); - //make packages contain database config files - foreach(get_instance()->load->get_package_paths() as $path) + // Make packages contain database config files + foreach (get_instance()->load->get_package_paths() as $path) { if ($path !== APPPATH) { - if (file_exists ($file_path = $path.'config/'.ENVIRONMENT.'/database.php')) + if (file_exists($file_path = $path.'config/'.ENVIRONMENT.'/database.php')) { - include ($file_path); + include($file_path); } - elseif ( file_exists ($file_path = $path.'config/database.php')) + elseif (file_exists($file_path = $path.'config/database.php')) { - include ($file_path); + include($file_path); } } } @@ -85,12 +85,12 @@ function &DB($params = '', $query_builder_override = NULL) } elseif (is_string($params)) { - - /* parse the URL from the DSN string - * Database settings can be passed as discreet - * parameters or as a data source name in the first - * parameter. DSNs must have this prototype: - * $dsn = 'driver://username:password@hostname/database'; + /** + * Parse the URL from the DSN string + * Database settings can be passed as discreet + * parameters or as a data source name in the first + * parameter. DSNs must have this prototype: + * $dsn = 'driver://username:password@hostname/database'; */ if (($dsn = @parse_url($params)) === FALSE) { @@ -106,7 +106,7 @@ function &DB($params = '', $query_builder_override = NULL) 'database' => isset($dsn['path']) ? rawurldecode(substr($dsn['path'], 1)) : '' ); - // were additional config items set? + // Were additional config items set? if (isset($dsn['query'])) { parse_str($dsn['query'], $extra); -- cgit v1.2.3-24-g4f1b