From 844a3bc306cb0659f403e319cd79530a2467657d Mon Sep 17 00:00:00 2001 From: vibbulan_519at19 Date: Mon, 24 Jun 2019 13:33:28 +0530 Subject: [PATCH] fixes #1 : String class has changed to CakeText class. --- .../Cake/Console/Command/Task/FixtureTask.php | 2 +- .../Cake/Console/Command/Task/ProjectTask.php | 4 ++-- core/lib/Cake/Console/HelpFormatter.php | 12 +++++------ core/lib/Cake/Console/Shell.php | 4 ++-- .../Component/SecurityComponent.php | 2 +- core/lib/Cake/Error/ErrorHandler.php | 2 +- core/lib/Cake/Error/ExceptionRenderer.php | 2 +- .../Cake/Model/Datasource/Database/Sqlite.php | 4 ++-- core/lib/Cake/Model/Datasource/DboSource.php | 6 +++--- core/lib/Cake/Model/Model.php | 10 +++++----- core/lib/Cake/Network/Email/CakeEmail.php | 4 ++-- .../Cake/Utility/{String.php => CakeText.php} | 20 +++++++++---------- core/lib/Cake/Utility/Debugger.php | 12 +++++------ core/lib/Cake/Utility/Hash.php | 4 ++-- core/lib/Cake/Utility/Security.php | 4 ++-- core/lib/Cake/Utility/Set.php | 4 ++-- core/lib/Cake/View/Helper/TextHelper.php | 12 +++++------ .../Console/Command/BenchmarkShell.php | 16 +++++++-------- 18 files changed, 62 insertions(+), 62 deletions(-) rename core/lib/Cake/Utility/{String.php => CakeText.php} (93%) diff --git a/core/lib/Cake/Console/Command/Task/FixtureTask.php b/core/lib/Cake/Console/Command/Task/FixtureTask.php index 87d1d4b..c7e7ba2 100644 --- a/core/lib/Cake/Console/Command/Task/FixtureTask.php +++ b/core/lib/Cake/Console/Command/Task/FixtureTask.php @@ -310,7 +310,7 @@ protected function _generateRecords($tableInfo, $recordCount = 1) { isset($fieldInfo['length']) && $fieldInfo['length'] == 36 ); if ($isPrimaryUuid) { - $insert = String::uuid(); + $insert = CakeText::uuid(); } else { $insert = "Lorem ipsum dolor sit amet"; if (!empty($fieldInfo['length'])) { diff --git a/core/lib/Cake/Console/Command/Task/ProjectTask.php b/core/lib/Cake/Console/Command/Task/ProjectTask.php index 9c047bc..8e81f88 100644 --- a/core/lib/Cake/Console/Command/Task/ProjectTask.php +++ b/core/lib/Cake/Console/Command/Task/ProjectTask.php @@ -20,7 +20,7 @@ App::uses('AppShell', 'Console/Command'); App::uses('File', 'Utility'); App::uses('Folder', 'Utility'); -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); App::uses('Security', 'Utility'); /** @@ -207,7 +207,7 @@ public function bake($path, $skel = null, $skip = array('empty')) { } foreach ($Folder->messages() as $message) { - $this->out(String::wrap(' * ' . $message), 1, Shell::VERBOSE); + $this->out(CakeText::wrap(' * ' . $message), 1, Shell::VERBOSE); } return true; diff --git a/core/lib/Cake/Console/HelpFormatter.php b/core/lib/Cake/Console/HelpFormatter.php index 7137d57..2616ae3 100644 --- a/core/lib/Cake/Console/HelpFormatter.php +++ b/core/lib/Cake/Console/HelpFormatter.php @@ -14,7 +14,7 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); /** * HelpFormatter formats help for console shells. Can format to either @@ -64,7 +64,7 @@ public function text($width = 72) { $out = array(); $description = $parser->description(); if (!empty($description)) { - $out[] = String::wrap($description, $width); + $out[] = CakeText::wrap($description, $width); $out[] = ''; } $out[] = __d('cake_console', 'Usage:'); @@ -76,7 +76,7 @@ public function text($width = 72) { $out[] = ''; $max = $this->_getMaxLength($subcommands) + 2; foreach ($subcommands as $command) { - $out[] = String::wrap($command->help($max), array( + $out[] = CakeText::wrap($command->help($max), array( 'width' => $width, 'indent' => str_repeat(' ', $max), 'indentAt' => 1 @@ -93,7 +93,7 @@ public function text($width = 72) { $out[] = __d('cake_console', 'Options:'); $out[] = ''; foreach ($options as $option) { - $out[] = String::wrap($option->help($max), array( + $out[] = CakeText::wrap($option->help($max), array( 'width' => $width, 'indent' => str_repeat(' ', $max), 'indentAt' => 1 @@ -108,7 +108,7 @@ public function text($width = 72) { $out[] = __d('cake_console', 'Arguments:'); $out[] = ''; foreach ($arguments as $argument) { - $out[] = String::wrap($argument->help($max), array( + $out[] = CakeText::wrap($argument->help($max), array( 'width' => $width, 'indent' => str_repeat(' ', $max), 'indentAt' => 1 @@ -118,7 +118,7 @@ public function text($width = 72) { } $epilog = $parser->epilog(); if (!empty($epilog)) { - $out[] = String::wrap($epilog, $width); + $out[] = CakeText::wrap($epilog, $width); $out[] = ''; } return implode("\n", $out); diff --git a/core/lib/Cake/Console/Shell.php b/core/lib/Cake/Console/Shell.php index 1561e1e..79e558e 100644 --- a/core/lib/Cake/Console/Shell.php +++ b/core/lib/Cake/Console/Shell.php @@ -534,11 +534,11 @@ protected function _getInput($prompt, $options, $default) { * @param string $text Text the text to format. * @param string|integer|array $options Array of options to use, or an integer to wrap the text to. * @return string Wrapped / indented text - * @see String::wrap() + * @see CakeText::wrap() * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::wrapText */ public function wrapText($text, $options = array()) { - return String::wrap($text, $options); + return CakeText::wrap($text, $options); } /** diff --git a/core/lib/Cake/Controller/Component/SecurityComponent.php b/core/lib/Cake/Controller/Component/SecurityComponent.php index e24e762..258b11b 100644 --- a/core/lib/Cake/Controller/Component/SecurityComponent.php +++ b/core/lib/Cake/Controller/Component/SecurityComponent.php @@ -18,7 +18,7 @@ */ App::uses('Component', 'Controller'); -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); App::uses('Hash', 'Utility'); App::uses('Security', 'Utility'); diff --git a/core/lib/Cake/Error/ErrorHandler.php b/core/lib/Cake/Error/ErrorHandler.php index 637ca52..ab9e6f6 100644 --- a/core/lib/Cake/Error/ErrorHandler.php +++ b/core/lib/Cake/Error/ErrorHandler.php @@ -107,7 +107,7 @@ class ErrorHandler { * @return void * @see http://php.net/manual/en/function.set-exception-handler.php */ - public static function handleException(Exception $exception) { + public static function handleException($exception) { $config = Configure::read('Exception'); if (!empty($config['log'])) { $message = sprintf("[%s] %s\n%s", diff --git a/core/lib/Cake/Error/ExceptionRenderer.php b/core/lib/Cake/Error/ExceptionRenderer.php index 8248d1a..861c768 100644 --- a/core/lib/Cake/Error/ExceptionRenderer.php +++ b/core/lib/Cake/Error/ExceptionRenderer.php @@ -88,7 +88,7 @@ class ExceptionRenderer { * * @param Exception $exception Exception */ - public function __construct(Exception $exception) { + public function __construct($exception) { $this->controller = $this->_getController($exception); if (method_exists($this->controller, 'apperror')) { diff --git a/core/lib/Cake/Model/Datasource/Database/Sqlite.php b/core/lib/Cake/Model/Datasource/Database/Sqlite.php index 33dd4bd..466f64d 100644 --- a/core/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/core/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -18,7 +18,7 @@ */ App::uses('DboSource', 'Model/Datasource'); -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); /** * DBO implementation for the SQLite3 DBMS. @@ -283,7 +283,7 @@ public function resultSet($results) { $last = strripos($querystring, 'FROM'); if ($last !== false) { $selectpart = substr($querystring, 7, $last - 8); - $selects = String::tokenize($selectpart, ',', '(', ')'); + $selects = CakeText::tokenize($selectpart, ',', '(', ')'); } } elseif (strpos($querystring, 'PRAGMA table_info') === 0) { $selects = array('cid', 'name', 'type', 'notnull', 'dflt_value', 'pk'); diff --git a/core/lib/Cake/Model/Datasource/DboSource.php b/core/lib/Cake/Model/Datasource/DboSource.php index 6681c2d..7a5bed8 100644 --- a/core/lib/Cake/Model/Datasource/DboSource.php +++ b/core/lib/Cake/Model/Datasource/DboSource.php @@ -18,7 +18,7 @@ */ App::uses('DataSource', 'Model/Datasource'); -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); App::uses('View', 'View'); /** @@ -2303,7 +2303,7 @@ public function fields(Model $model, $alias = null, $fields = array(), $quote = if ($allFields) { $fields = array_keys($model->schema()); } elseif (!is_array($fields)) { - $fields = String::tokenize($fields); + $fields = CakeText::tokenize($fields); } $fields = array_values(array_filter($fields)); $allFields = $allFields || in_array('*', $fields) || in_array($model->alias . '.*', $fields); @@ -2589,7 +2589,7 @@ protected function _parseKey($model, $key, $value) { } if ($bound) { - return String::insert($key . ' ' . trim($operator), $value); + return CakeText::insert($key . ' ' . trim($operator), $value); } if (!preg_match($operatorMatch, trim($operator))) { diff --git a/core/lib/Cake/Model/Model.php b/core/lib/Cake/Model/Model.php index 7b93ab9..2000618 100644 --- a/core/lib/Cake/Model/Model.php +++ b/core/lib/Cake/Model/Model.php @@ -21,7 +21,7 @@ App::uses('ClassRegistry', 'Utility'); App::uses('Validation', 'Utility'); -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); App::uses('Hash', 'Utility'); App::uses('BehaviorCollection', 'Model'); App::uses('ModelBehavior', 'Model'); @@ -1748,9 +1748,9 @@ public function save($data = null, $validate = true, $fieldList = array()) { if (empty($this->data[$this->alias][$this->primaryKey]) && $isUUID) { if (array_key_exists($this->primaryKey, $this->data[$this->alias])) { $j = array_search($this->primaryKey, $fields); - $values[$j] = String::uuid(); + $values[$j] = CakeText::uuid(); } else { - list($fields[], $values[]) = array($this->primaryKey, String::uuid()); + list($fields[], $values[]) = array($this->primaryKey, CakeText::uuid()); } } @@ -1842,7 +1842,7 @@ protected function _saveMulti($joined, $id, $db) { $newJoins[] = $row; $values = array($id, $row); if ($isUUID && $primaryAdded) { - $values[] = String::uuid(); + $values[] = CakeText::uuid(); } $newValues[$row] = $values; unset($values); @@ -2909,7 +2909,7 @@ protected function _findList($state, $query, $results = array()) { $list = array("{n}.{$this->alias}.{$this->primaryKey}", "{n}.{$this->alias}.{$this->displayField}", null); } else { if (!is_array($query['fields'])) { - $query['fields'] = String::tokenize($query['fields']); + $query['fields'] = CakeText::tokenize($query['fields']); } if (count($query['fields']) === 1) { diff --git a/core/lib/Cake/Network/Email/CakeEmail.php b/core/lib/Cake/Network/Email/CakeEmail.php index 773fd5a..76c9516 100644 --- a/core/lib/Cake/Network/Email/CakeEmail.php +++ b/core/lib/Cake/Network/Email/CakeEmail.php @@ -20,7 +20,7 @@ App::uses('Validation', 'Utility'); App::uses('Multibyte', 'I18n'); App::uses('AbstractTransport', 'Network/Email'); -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); App::uses('View', 'View'); App::import('I18n', 'Multibyte'); @@ -711,7 +711,7 @@ public function getHeaders($include = array()) { } if ($this->_messageId !== false) { if ($this->_messageId === true) { - $headers['Message-ID'] = '<' . str_replace('-', '', String::UUID()) . '@' . $this->_domain . '>'; + $headers['Message-ID'] = '<' . str_replace('-', '', CakeText::UUID()) . '@' . $this->_domain . '>'; } else { $headers['Message-ID'] = $this->_messageId; } diff --git a/core/lib/Cake/Utility/String.php b/core/lib/Cake/Utility/CakeText.php similarity index 93% rename from core/lib/Cake/Utility/String.php rename to core/lib/Cake/Utility/CakeText.php index b11e872..48ecc1e 100644 --- a/core/lib/Cake/Utility/String.php +++ b/core/lib/Cake/Utility/CakeText.php @@ -23,7 +23,7 @@ * * @package Cake.Utility */ -class String { +class CakeText { /** * Generate a random UUID @@ -181,7 +181,7 @@ public static function tokenize($data, $separator = ',', $leftBound = '(', $righ /** * Replaces variable placeholders inside a $str with any given $data. Each key in the $data array * corresponds to a variable placeholder name in $str. - * Example: `String::insert(':name is :age years old.', array('name' => 'Bob', '65'));` + * Example: `CakeText::insert(':name is :age years old.', array('name' => 'Bob', '65'));` * Returns: Bob is 65 years old. * * Available $options are: @@ -191,7 +191,7 @@ public static function tokenize($data, $separator = ',', $leftBound = '(', $righ * - escape: The character or string used to escape the before character / string (Defaults to `\`) * - format: A regex to use for matching variable placeholders. Default is: `/(? val array where each key stands for a placeholder variable name @@ -207,7 +207,7 @@ public static function insert($str, $data, $options = array()) { $format = $options['format']; $data = (array)$data; if (empty($data)) { - return ($options['clean']) ? String::cleanInsert($str, $options) : $str; + return ($options['clean']) ? CakeText::cleanInsert($str, $options) : $str; } if (!isset($format)) { @@ -226,7 +226,7 @@ public static function insert($str, $data, $options = array()) { $offset = $pos + strlen($val); $str = substr_replace($str, $val, $pos, 1); } - return ($options['clean']) ? String::cleanInsert($str, $options) : $str; + return ($options['clean']) ? CakeText::cleanInsert($str, $options) : $str; } else { asort($data); @@ -251,19 +251,19 @@ public static function insert($str, $data, $options = array()) { if (!isset($options['format']) && isset($options['before'])) { $str = str_replace($options['escape'] . $options['before'], $options['before'], $str); } - return ($options['clean']) ? String::cleanInsert($str, $options) : $str; + return ($options['clean']) ? CakeText::cleanInsert($str, $options) : $str; } /** - * Cleans up a String::insert() formatted string with given $options depending on the 'clean' key in + * Cleans up a CakeText::insert() formatted string with given $options depending on the 'clean' key in * $options. The default method used is text but html is also available. The goal of this function * is to replace all whitespace and unneeded markup around placeholders that did not get replaced - * by String::insert(). + * by CakeText::insert(). * * @param string $str * @param string $options * @return string - * @see String::insert() + * @see CakeText::insert() */ public static function cleanInsert($str, $options) { $clean = $options['clean']; @@ -292,7 +292,7 @@ public static function cleanInsert($str, $options) { $str = preg_replace($kleenex, $clean['replacement'], $str); if ($clean['andText']) { $options['clean'] = array('method' => 'text'); - $str = String::cleanInsert($str, $options); + $str = CakeText::cleanInsert($str, $options); } break; case 'text': diff --git a/core/lib/Cake/Utility/Debugger.php b/core/lib/Cake/Utility/Debugger.php index ac93b8c..65b35fb 100644 --- a/core/lib/Cake/Utility/Debugger.php +++ b/core/lib/Cake/Utility/Debugger.php @@ -20,7 +20,7 @@ */ App::uses('CakeLog', 'Log'); -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); /** * Provide custom logging and error handling. @@ -340,7 +340,7 @@ public static function trace($options = array()) { $trace['path'] = self::trimPath($trace['file']); $trace['reference'] = $reference; unset($trace['object'], $trace['args']); - $back[] = String::insert($tpl, $trace, array('before' => '{:', 'after' => '}')); + $back[] = CakeText::insert($tpl, $trace, array('before' => '{:', 'after' => '}')); } } @@ -606,7 +606,7 @@ public static function outputAs($format = null) { * * `Debugger::addFormat('custom', $data);` * - * Where $data is an array of strings that use String::insert() variable + * Where $data is an array of strings that use CakeText::insert() variable * replacement. The template vars should be in a `{:id}` style. * An error formatter can have the following keys: * @@ -738,7 +738,7 @@ public function outputError($data) { if (isset($tpl['links'])) { foreach ($tpl['links'] as $key => $val) { - $links[$key] = String::insert($val, $data, $insertOpts); + $links[$key] = CakeText::insert($val, $data, $insertOpts); } } @@ -754,14 +754,14 @@ public function outputError($data) { if (is_array($value)) { $value = join("\n", $value); } - $info .= String::insert($tpl[$key], array($key => $value) + $data, $insertOpts); + $info .= CakeText::insert($tpl[$key], array($key => $value) + $data, $insertOpts); } $links = join(' ', $links); if (isset($tpl['callback']) && is_callable($tpl['callback'])) { return call_user_func($tpl['callback'], $data, compact('links', 'info')); } - echo String::insert($tpl['error'], compact('links', 'info') + $data, $insertOpts); + echo CakeText::insert($tpl['error'], compact('links', 'info') + $data, $insertOpts); } /** diff --git a/core/lib/Cake/Utility/Hash.php b/core/lib/Cake/Utility/Hash.php index e3a3592..b8cc2b6 100644 --- a/core/lib/Cake/Utility/Hash.php +++ b/core/lib/Cake/Utility/Hash.php @@ -13,7 +13,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); /** * Library of array functions for manipulating and extracting data @@ -99,7 +99,7 @@ public static function extract(array $data, $path) { if (strpos('[', $path) === false) { $tokens = explode('.', $path); } else { - $tokens = String::tokenize($path, '.', '[', ']'); + $tokens = CakeText::tokenize($path, '.', '[', ']'); } $_key = '__set_item__'; diff --git a/core/lib/Cake/Utility/Security.php b/core/lib/Cake/Utility/Security.php index 3ed30d5..5ea640d 100644 --- a/core/lib/Cake/Utility/Security.php +++ b/core/lib/Cake/Utility/Security.php @@ -17,7 +17,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); /** * Security Library contains utility methods related to security @@ -59,7 +59,7 @@ public static function inactiveMins() { * @return string Hash */ public static function generateAuthKey() { - return Security::hash(String::uuid()); + return Security::hash(CakeText::uuid()); } /** diff --git a/core/lib/Cake/Utility/Set.php b/core/lib/Cake/Utility/Set.php index bfb9420..2124c09 100644 --- a/core/lib/Cake/Utility/Set.php +++ b/core/lib/Cake/Utility/Set.php @@ -17,7 +17,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('String', 'Utility'); +App::uses('CakeText', 'Utility'); App::uses('Hash', 'Utility'); /** @@ -549,7 +549,7 @@ public static function classicExtract($data, $path = null) { return null; } if (is_string($path) && strpos($path, '{') !== false) { - $path = String::tokenize($path, '.', '{', '}'); + $path = CakeText::tokenize($path, '.', '{', '}'); } elseif (is_string($path)) { $path = explode('.', $path); } diff --git a/core/lib/Cake/View/Helper/TextHelper.php b/core/lib/Cake/View/Helper/TextHelper.php index 795af64..2582068 100644 --- a/core/lib/Cake/View/Helper/TextHelper.php +++ b/core/lib/Cake/View/Helper/TextHelper.php @@ -66,7 +66,7 @@ class TextHelper extends AppHelper { * @throws CakeException when the engine class could not be found. */ public function __construct(View $View, $settings = array()) { - $settings = Hash::merge(array('engine' => 'String'), $settings); + $settings = Hash::merge(array('engine' => 'CakeText'), $settings); parent::__construct($View, $settings); list($plugin, $engineClass) = pluginSplit($settings['engine'], true); App::uses($engineClass, $plugin . 'Utility'); @@ -211,7 +211,7 @@ public function autoLink($text, $options = array()) { } /** - * @see String::highlight() + * @see CakeText::highlight() * * @param string $text Text to search the phrase in * @param string $phrase The phrase that will be searched @@ -224,7 +224,7 @@ public function highlight($text, $phrase, $options = array()) { } /** - * @see String::stripLinks() + * @see CakeText::stripLinks() * * @param string $text Text * @return string The text without links @@ -235,7 +235,7 @@ public function stripLinks($text) { } /** - * @see String::truncate() + * @see CakeText::truncate() * * @param string $text String to truncate. * @param integer $length Length of returned string, including ellipsis. @@ -248,7 +248,7 @@ public function truncate($text, $length = 100, $options = array(), $ending = '.. } /** - * @see String::excerpt() + * @see CakeText::excerpt() * * @param string $text String to search the phrase in * @param string $phrase Phrase that will be searched for @@ -262,7 +262,7 @@ public function excerpt($text, $phrase, $radius = 100, $ending = '...') { } /** - * @see String::toList() + * @see CakeText::toList() * * @param array $list The list to be joined * @param string $and The word used to join the last and second last items together with. Defaults to 'and' diff --git a/core/plugins/DebugKit/Console/Command/BenchmarkShell.php b/core/plugins/DebugKit/Console/Command/BenchmarkShell.php index b4a529f..007b78c 100644 --- a/core/plugins/DebugKit/Console/Command/BenchmarkShell.php +++ b/core/plugins/DebugKit/Console/Command/BenchmarkShell.php @@ -30,7 +30,7 @@ * @todo Export/graphing of data to .dot format for graphviz visualization * @todo Make calculated results round to leading significant digit position of std dev. */ -App::uses('String','Utility'); +App::uses('CakeText','Utility'); class BenchmarkShell extends Shell { /** @@ -48,7 +48,7 @@ public function main() { $options = array_merge($defaults, $this->params); $times = array(); - $this->out(String::insert(__d('debug_kit', '-> Testing :url'), compact('url'))); + $this->out(CakeText::insert(__d('debug_kit', '-> Testing :url'), compact('url'))); $this->out(""); for ($i = 0; $i < $options['n']; $i++) { if (floor($options['t'] - array_sum($times)) <= 0 || $options['n'] <= 1) { @@ -73,24 +73,24 @@ protected function _results($times) { $duration = array_sum($times); $requests = count($times); - $this->out(String::insert(__d('debug_kit', 'Total Requests made: :requests'), compact('requests'))); - $this->out(String::insert(__d('debug_kit', 'Total Time elapsed: :duration (seconds)'), compact('duration'))); + $this->out(CakeText::insert(__d('debug_kit', 'Total Requests made: :requests'), compact('requests'))); + $this->out(CakeText::insert(__d('debug_kit', 'Total Time elapsed: :duration (seconds)'), compact('duration'))); $this->out(""); - $this->out(String::insert(__d('debug_kit', 'Requests/Second: :rps req/sec'), array( + $this->out(CakeText::insert(__d('debug_kit', 'Requests/Second: :rps req/sec'), array( 'rps' => round($requests / $duration, 3) ))); - $this->out(String::insert(__d('debug_kit', 'Average request time: :average-time seconds'), array( + $this->out(CakeText::insert(__d('debug_kit', 'Average request time: :average-time seconds'), array( 'average-time' => round($duration / $requests, 3) ))); - $this->out(String::insert(__d('debug_kit', 'Standard deviation of average request time: :std-dev'), array( + $this->out(CakeText::insert(__d('debug_kit', 'Standard deviation of average request time: :std-dev'), array( 'std-dev' => round($this->_deviation($times, true), 3) ))); - $this->out(String::insert(__d('debug_kit', 'Longest/shortest request: :longest sec/:shortest sec'), array( + $this->out(CakeText::insert(__d('debug_kit', 'Longest/shortest request: :longest sec/:shortest sec'), array( 'longest' => round(max($times), 3), 'shortest' => round(min($times), 3) )));