Skip to content

Commit af43b09

Browse files
committed
Remove try catch, fix stan
1 parent ee03cea commit af43b09

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/Transformers/DataArrayTransformer.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Illuminate\Support\Arr;
66
use Illuminate\Support\Collection;
7-
use Throwable;
87
use Yajra\DataTables\Html\Column;
98

109
class DataArrayTransformer
@@ -71,16 +70,12 @@ protected function buildColumnByCollection(array $row, Collection $columns, stri
7170
*/
7271
protected function decodeContent(bool|string $data): string
7372
{
74-
try {
75-
if (is_bool($data)) {
76-
return $data ? 'True' : 'False';
77-
}
73+
if (is_bool($data)) {
74+
return $data ? 'True' : 'False';
75+
}
7876

79-
$decoded = html_entity_decode(trim(strip_tags($data)), ENT_QUOTES, 'UTF-8');
77+
$decoded = html_entity_decode(trim(strip_tags($data)), ENT_QUOTES, 'UTF-8');
8078

81-
return str_replace("\xc2\xa0", ' ', $decoded);
82-
} catch (Throwable $e) {
83-
return $data;
84-
}
79+
return str_replace("\xc2\xa0", ' ', $decoded);
8580
}
8681
}

0 commit comments

Comments
 (0)