mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 02:52:41 +00:00
Fixing most coding standard issues in Utility/
This commit is contained in:
parent
acccdcde1f
commit
9d325fe46e
13 changed files with 58 additions and 65 deletions
|
@ -40,13 +40,13 @@ class String {
|
|||
'::', str_repeat(':0000', 8 - substr_count($node, ':')) . ':', $node
|
||||
);
|
||||
}
|
||||
$node = explode(':', $node) ;
|
||||
$ipv6 = '' ;
|
||||
$node = explode(':', $node);
|
||||
$ipv6 = '';
|
||||
|
||||
foreach ($node as $id) {
|
||||
$ipv6 .= str_pad(base_convert($id, 16, 2), 16, 0, STR_PAD_LEFT);
|
||||
}
|
||||
$node = base_convert($ipv6, 2, 10);
|
||||
$node = base_convert($ipv6, 2, 10);
|
||||
|
||||
if (strlen($node) < 38) {
|
||||
$node = null;
|
||||
|
@ -551,7 +551,7 @@ class String {
|
|||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/text.html#TextHelper::excerpt
|
||||
*/
|
||||
public static function excerpt($text, $phrase, $radius = 100, $ending = '...') {
|
||||
if (empty($text) or empty($phrase)) {
|
||||
if (empty($text) || empty($phrase)) {
|
||||
return self::truncate($text, $radius * 2, array('ending' => $ending));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue