From 0688ac9ad88a03f1c56cfcd9e3c475b83301344d Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 20 Apr 2012 10:25:04 -0400 Subject: Start comment cleanup of libraries --- system/libraries/Typography.php | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'system/libraries/Typography.php') diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index 21bbad038..50bd12486 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -36,22 +36,46 @@ */ class CI_Typography { - // Block level elements that should not be wrapped inside

tags + /** + * Block level elements that should not be wrapped inside

tags + * + * @var string + */ public $block_elements = 'address|blockquote|div|dl|fieldset|form|h\d|hr|noscript|object|ol|p|pre|script|table|ul'; - // Elements that should not have

and
tags within them. + /** + * Elements that should not have

and
tags within them. + * + * @var string + */ public $skip_elements = 'p|pre|ol|ul|dl|object|table|h\d'; - // Tags we want the parser to completely ignore when splitting the string. + /** + * Tags we want the parser to completely ignore when splitting the string. + * + * @var string + */ public $inline_elements = 'a|abbr|acronym|b|bdo|big|br|button|cite|code|del|dfn|em|i|img|ins|input|label|map|kbd|q|samp|select|small|span|strong|sub|sup|textarea|tt|var'; - // array of block level elements that require inner content to be within another block level element + /** + * array of block level elements that require inner content to be within another block level element + * + * @var array + */ public $inner_block_required = array('blockquote'); - // the last block element parsed + /** + * the last block element parsed + * + * @var string + */ public $last_block_element = ''; - // whether or not to protect quotes within { curly braces } + /** + * whether or not to protect quotes within { curly braces } + * + * @var bool + */ public $protect_braced_quotes = FALSE; /** -- cgit v1.2.3-24-g4f1b From 5645479c622eb36cf9869797896dc0921568c4a9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 17 May 2012 14:32:19 +0300 Subject: Clean up the libraries --- system/libraries/Typography.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/libraries/Typography.php') diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index 50bd12486..6aaa993ae 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -38,7 +38,7 @@ class CI_Typography { /** * Block level elements that should not be wrapped inside

tags - * + * * @var string */ public $block_elements = 'address|blockquote|div|dl|fieldset|form|h\d|hr|noscript|object|ol|p|pre|script|table|ul'; @@ -52,7 +52,7 @@ class CI_Typography { /** * Tags we want the parser to completely ignore when splitting the string. - * + * * @var string */ public $inline_elements = 'a|abbr|acronym|b|bdo|big|br|button|cite|code|del|dfn|em|i|img|ins|input|label|map|kbd|q|samp|select|small|span|strong|sub|sup|textarea|tt|var'; -- cgit v1.2.3-24-g4f1b From d261b1e89c3d4d5191036d5a5660ef6764e593a0 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:12:16 +0100 Subject: Replaced `==` with `===` and `!=` with `!==` in /system/libraries --- system/libraries/Typography.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'system/libraries/Typography.php') diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index 6aaa993ae..a50934f2c 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -95,7 +95,7 @@ class CI_Typography { */ public function auto_typography($str, $reduce_linebreaks = FALSE) { - if ($str == '') + if ($str === '') { return ''; } @@ -173,7 +173,7 @@ class CI_Typography { $process = ($match[1] === '/'); } - if ($match[1] == '') + if ($match[1] === '') { $this->last_block_element = $match[2]; } @@ -344,7 +344,7 @@ class CI_Typography { */ protected function _format_newlines($str) { - if ($str == '' OR (strpos($str, "\n") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required))) + if ($str === '' OR (strpos($str, "\n") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required))) { return $str; } @@ -356,7 +356,7 @@ class CI_Typography { $str = preg_replace("/([^\n])(\n)([^\n])/", '\\1
\\2\\3', $str); // Wrap the whole enchilada in enclosing paragraphs - if ($str != "\n") + if ($str !== "\n") { // We trim off the right-side new line so that the closing

tag // will be positioned immediately following the string, matching -- cgit v1.2.3-24-g4f1b 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/libraries/Typography.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system/libraries/Typography.php') diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index a50934f2c..d83bf519b 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -1,4 +1,4 @@ -