summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2013-09-15 00:32:50 +0200
committeremkael <emkael@tlen.pl>2013-09-15 00:32:50 +0200
commit33afd96244c221bc01576827f189a13d4b735062 (patch)
tree1972d1077993fbf1b076d3edd1441ff270720c72
parent7e4a01da3144a0a9e6dfe4c816798fb003633be6 (diff)
* tablica asocjacyjna zamiast obiektu na wyjściu kalkulatora
-rw-r--r--bin/lib/OsikaEvaluator.php2
-rw-r--r--tests/OsikaEvaluatorTest.php2
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 {