@@ -150,7 +150,7 @@ function ascii_to_entities(string $str): string
150
150
{
151
151
/*
152
152
If the $temp array has a value but we have moved on, then it seems only
153
- fair that we output that entity and restart $temp before continuing. -Paul
153
+ fair that we output that entity and restart $temp before continuing.
154
154
*/
155
155
if (count ($ temp ) === 1 )
156
156
{
@@ -281,7 +281,7 @@ function word_censor(string $str, $censored, string $replacement = ''): string
281
281
// \w, \b and a few others do not match on a unicode character
282
282
// set for performance reasons. As a result words like über
283
283
// will not match on a word boundary. Instead, we'll assume that
284
- // a bad word will be bookeneded by any of these characters.
284
+ // a bad word will be bookended by any of these characters.
285
285
$ delim = '[-_ \'\"`(){}<>\[\]|!?@#%&,.:;^~*+=\/ 0-9\n\r\t] ' ;
286
286
287
287
foreach ($ censored as $ badword )
@@ -402,7 +402,7 @@ function highlight_code(string $str): string
402
402
*
403
403
* @param string $str the text string
404
404
* @param string $phrase the phrase you'd like to highlight
405
- * @param string $tag_open the openging tag to precede the phrase with
405
+ * @param string $tag_open the opening tag to precede the phrase with
406
406
* @param string $tag_close the closing tag to end the phrase with
407
407
*
408
408
* @return string
@@ -460,7 +460,7 @@ function convert_accented_characters(string $str): string
460
460
* Anything placed between {unwrap}{/unwrap} will not be word wrapped, nor
461
461
* will URLs.
462
462
*
463
- * @param string $str the text string
463
+ * @param string $str the text string
464
464
* @param integer $charlim = 76 the number of characters to wrap at
465
465
*
466
466
* @return string
@@ -604,9 +604,9 @@ function ellipsize(string $str, int $max_length, $position = 1, string $ellipsis
604
604
*
605
605
* Removes slashes contained in a string or in an array
606
606
*
607
- * @param mixed string or array
607
+ * @param mixed $str string or array
608
608
*
609
- * @return mixed string or array
609
+ * @return mixed string or array
610
610
*/
611
611
function strip_slashes ($ str )
612
612
{
@@ -632,7 +632,7 @@ function strip_slashes($str)
632
632
*
633
633
* Removes single and double quotes from a string
634
634
*
635
- * @param string
635
+ * @param string $str
636
636
*
637
637
* @return string
638
638
*/
@@ -651,7 +651,7 @@ function strip_quotes(string $str): string
651
651
*
652
652
* Converts single and double quotes to entities
653
653
*
654
- * @param string
654
+ * @param string $str
655
655
*
656
656
* @return string
657
657
*/
@@ -677,7 +677,7 @@ function quotes_to_entities(string $str): string
677
677
*
678
678
* http://www.some-site.com/index.php
679
679
*
680
- * @param string
680
+ * @param string $str
681
681
*
682
682
* @return string
683
683
*/
@@ -712,7 +712,7 @@ function reduce_multiples(string $str, string $character = ',', bool $trim = fal
712
712
{
713
713
$ str = preg_replace ('# ' . preg_quote ($ character , '# ' ) . '{2,}# ' , $ character , $ str );
714
714
715
- return ($ trim === true ) ? trim ($ str , $ character ) : $ str ;
715
+ return ($ trim ) ? trim ($ str , $ character ) : $ str ;
716
716
}
717
717
}
718
718
@@ -814,7 +814,7 @@ function alternator(): string
814
814
815
815
$ args = func_get_args ();
816
816
817
- return $ args [($ i ++ % count ($ args ))];
817
+ return $ args [($ i ++ % count ($ args ))];
818
818
}
819
819
}
820
820
@@ -829,13 +829,13 @@ function alternator(): string
829
829
*
830
830
* @param string $text String to search the phrase
831
831
* @param string $phrase Phrase that will be searched for.
832
- * @param integer $radius The amount of characters returned arround the phrase.
832
+ * @param integer $radius The amount of characters returned around the phrase.
833
833
* @param string $ellipsis Ending that will be appended
834
834
*
835
835
* @return string
836
836
*
837
837
* If no $phrase is passed, will generate an excerpt of $radius characters
838
- * from the begining of $text.
838
+ * from the beginning of $text.
839
839
*/
840
840
function excerpt (string $ text , string $ phrase = null , int $ radius = 100 , string $ ellipsis = '... ' ): string
841
841
{
0 commit comments