From c0189183f95d2b893dad1c7df040da7ce3ae6db2 Mon Sep 17 00:00:00 2001 From: H Hautakoski Date: Sun, 19 Sep 2010 16:33:23 +0200 Subject: [PATCH] cleanup --- library/Fiktiv/Performance.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/library/Fiktiv/Performance.php b/library/Fiktiv/Performance.php index 75d551c..eeb8610 100644 --- a/library/Fiktiv/Performance.php +++ b/library/Fiktiv/Performance.php @@ -41,11 +41,11 @@ class Fiktiv_Performance 'results' => array() ); - for ($x=0;$x<$times;$x++) { + for($x=0; $x < $times; $x++) { self::begin(); - for ($y=0;$y<$iterations;$y++) { + for($y=0; $y < $iterations; $y++) { call_user_func_array($function, $params); } @@ -53,12 +53,13 @@ class Fiktiv_Performance $result['total'] += self::result(); - if ($result['min'] > self::result() || empty($result['min'])) + if ($result['min'] > self::result() || empty($result['min'])) { $result['min'] = self::result(); + } - if ($result['max'] < self::result()) + if ($result['max'] < self::result()) { $result['max'] = self::result(); - + } } $result['avg'] = array_sum($result['results']) / count($result['results']);