From 9d0e22ebd214726f81f68433598f00d610b6da31 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Thu, 19 Jul 2012 17:18:54 +0400 Subject: [PATCH] Modified Profiler message. --- tests/util/profiler/ProfilerTest.php | 2 +- util/profiler/Profiler.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/util/profiler/ProfilerTest.php b/tests/util/profiler/ProfilerTest.php index 2f2022c..78e50ad 100644 --- a/tests/util/profiler/ProfilerTest.php +++ b/tests/util/profiler/ProfilerTest.php @@ -39,7 +39,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase public function testGetInstaceNoDebug() { Config::set('PROFILER', false); - $this->setExpectedException('GeneralException', 'Need to turn on PROFILER before use.'); + $this->setExpectedException('GeneralException', 'Need turn PROFILER before use.'); Profiler::getInstance(); } diff --git a/util/profiler/Profiler.php b/util/profiler/Profiler.php index a0c5067..9e6fe80 100644 --- a/util/profiler/Profiler.php +++ b/util/profiler/Profiler.php @@ -23,7 +23,7 @@ class Profiler private function __construct() { if (Config::get('PROFILER') == false) { - throw new GeneralException('Need to turn on PROFILER before use.'); + throw new GeneralException('Need turn PROFILER before use.'); } } @@ -82,7 +82,7 @@ class Profiler $html = '
' . 'Elapsed time: ' . round(($this->end - $this->start) * 1000, 2) . 'ms.
'; if (count($this->queries) == 0 && !Config::get('PROFILER_DETAILS')) { - $html .= 'Queries not counted. Turn PROFILER_DETAILS on true, if you want to profile queries.
'; + $html .= 'Queries not counted. Turn PROFILER_DETAILS if you want to profile queries.
'; } else { $html .= 'Queries: ' . count($this->queries) . ' [' . round($queriesTime * 1000, 2) . ' ms]
'; } @@ -104,7 +104,7 @@ class Profiler $queriesTime += $query->getElapsed(); } if (count($this->queries) == 0 && !Config::get('PROFILER_DETAILS')) { - FB::table('Queries not counted. Turn PROFILER_DETAILS on true, if you want to profile queries.', $table); + FB::table('Queries not counted. Turn PROFILER_DETAILS if you want to profile queries.', $table); } else { FB::table('Queries: ' . count($this->queries) . ' [' . round($queriesTime * 1000, 2) . ' ms]', $table); } @@ -122,7 +122,7 @@ class Profiler $html = str_pad(PHP_EOL, 60, '-', STR_PAD_LEFT); $html .= 'Elapsed time: ' . round(($this->end - $this->start) * 1000, 2) . 'ms.' . PHP_EOL; if (count($this->queries) == 0 && !Config::get('PROFILER_DETAILS')) { - $html .= 'Queries not counted. Turn PROFILER_DETAILS on true, if you want to profile queries.' . PHP_EOL; + $html .= 'Queries not counted. Turn PROFILER_DETAILS if you want to profile queries.' . PHP_EOL; } else { $html .= 'Queries: ' . count($this->queries) . ' [' . round($queriesTime * 1000, 2) . ' ms] ' . PHP_EOL; }