Fixing most coding standard issues in Utility/

This commit is contained in:
mark_story 2012-03-03 17:31:47 -05:00
parent acccdcde1f
commit 9d325fe46e
13 changed files with 58 additions and 65 deletions

View file

@ -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));
}