Skip to content

Commit 548e12d

Browse files
committed
Remove cast toArray
See barryvdh#248
1 parent 4ccd363 commit 548e12d

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/DataCollector/EventCollector.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public function onWildcardEvent()
2121
$name = $this->getCurrentEvent($args);
2222
$time = microtime(true);
2323
$this->addMeasure($name, $time, $time, $this->prepareParams($args) );
24-
2524
}
2625

2726
public function subscribe(Dispatcher $events)
@@ -44,9 +43,6 @@ protected function prepareParams($params)
4443
{
4544
$data = array();
4645
foreach ($params as $key => $value) {
47-
if (is_object($value) && method_exists($value, 'toArray')) {
48-
$value = $value->toArray();
49-
}
5046
$data[$key] = $this->exporter->exportValue($value);
5147
}
5248
return $data;

src/DataCollector/ViewCollector.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ public function addView(View $view)
6969
} else {
7070
$data = array();
7171
foreach ($view->getData() as $key => $value) {
72-
if (is_object($value) && method_exists($value, 'toArray')) {
73-
$value = $value->toArray();
74-
}
7572
$data[$key] = $this->exporter->exportValue($value);
7673
}
7774
$params = $data;

0 commit comments

Comments
 (0)