Esempio n. 1
0
 protected function normalize($data)
 {
     if (is_bool($data) || is_null($data)) {
         return var_export($data, true);
     }
     return parent::normalize($data);
 }
Esempio n. 2
0
 protected function normalize($data)
 {
     if (is_bool($data) || is_null($data)) {
         return var_export($data, true);
     }
     if ($data instanceof \Exception) {
         return '[object] (' . get_class($data) . ': ' . $data->getMessage() . ' at ' . $data->getFile() . ':' . $data->getLine() . ')';
     }
     return parent::normalize($data);
 }
Esempio n. 3
0
 protected function normalize($data)
 {
     if (is_bool($data) || is_null($data)) {
         return var_export($data, true);
     }
     if ($data instanceof \Exception) {
         $previousText = '';
         if ($previous = $data->getPrevious()) {
             do {
                 $previousText .= ', ' . get_class($previous) . ': ' . $previous->getMessage() . ' at ' . $previous->getFile() . ':' . $previous->getLine();
             } while ($previous = $previous->getPrevious());
         }
         return '[object] (' . get_class($data) . ': ' . $data->getMessage() . ' at ' . $data->getFile() . ':' . $data->getLine() . $previousText . ')';
     }
     return parent::normalize($data);
 }