Skip to content

Commit

Permalink
Ignore ms and number formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Apr 8, 2015
1 parent 871f0bf commit b8a055b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Abstracts/AbstractApiFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public function encode(
$result, $statusCode = 200, $statusMessage = '', $type = null
)
{
$output = new \stdClass();
$output->status = new \stdClass();
$output->status->code = $statusCode;
$output = new \stdClass();
$output->status = new \stdClass();
$output->status->code = $statusCode;
$output->status->message = $statusMessage;
$output->type = $type ? $type : get_class($result);
$output->type = $type ? $type : get_class($result);

//Ensure Valid Namespace
if(substr($output->type, 0, 1) !== '\\' && stristr($output->type, '\\'))
Expand Down Expand Up @@ -100,9 +100,9 @@ public function decode(ResponseInterface $raw, $totalTime = 0)
$result->result,
$result->status->code,
$result->status->message,
(float)$totalTime,
(float)$executionTime,
(float)$callTime
(float)str_replace([',', 'ms'], '', $totalTime),
(float)str_replace([',', 'ms'], '', $executionTime),
(float)str_replace([',', 'ms'], '', $callTime)
)
);
}
Expand Down

0 comments on commit b8a055b

Please sign in to comment.