From 33afd96244c221bc01576827f189a13d4b735062 Mon Sep 17 00:00:00 2001 From: emkael Date: Sun, 15 Sep 2013 00:32:50 +0200 Subject: * tablica asocjacyjna zamiast obiektu na wyjściu kalkulatora MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/lib/OsikaEvaluator.php | 2 +- tests/OsikaEvaluatorTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/lib/OsikaEvaluator.php b/bin/lib/OsikaEvaluator.php index 6b2e6a2..e3a7543 100644 --- a/bin/lib/OsikaEvaluator.php +++ b/bin/lib/OsikaEvaluator.php @@ -271,7 +271,7 @@ class OsikaEvaluator { $result['subtotal'] = $subtotal; $result['total'] = array('total' => $total); - return json_decode(json_encode($result)); + return $result; } } diff --git a/tests/OsikaEvaluatorTest.php b/tests/OsikaEvaluatorTest.php index 1256515..ce713a7 100644 --- a/tests/OsikaEvaluatorTest.php +++ b/tests/OsikaEvaluatorTest.php @@ -17,7 +17,7 @@ class OsikaEvaluatorTest extends PHPUnit_Framework_TestCase { foreach ($file as $line) { if (trim($line)) { if ($switch) { - $item[] = json_decode($line); + $item[] = json_decode($line, TRUE); $ret[] = $item; } else { -- cgit v1.2.3