diff --git a/src/BindableCache.php b/src/BindableCache.php index 4f10e46..9357068 100644 --- a/src/BindableCache.php +++ b/src/BindableCache.php @@ -62,6 +62,9 @@ public function isBindable(object $object):bool { /** @var ?ReflectionNamedType $refReturn */ $refReturn = $refMethod->getReturnType(); + if(!$refReturn instanceof ReflectionNamedType) { + continue; + } $refReturnName = $refReturn?->getName(); foreach($refAttributes as $refAttr) { diff --git a/src/TableBinder.php b/src/TableBinder.php index e685697..06ff6bf 100644 --- a/src/TableBinder.php +++ b/src/TableBinder.php @@ -200,7 +200,7 @@ public function detectTableDataStructureType(array $array):TableDataStructureTyp */ foreach($rowData as $cellIndex => $cellData) { if($rowIndex > 0) { - if(isset($array[0]) && is_array($array[0]) && array_is_list($array[0]) && !array_is_list($rowData)) { + if(isset($array[0]) && array_is_list($array[0]) && !array_is_list($rowData)) { if(!is_iterable($cellData)) { throw new IncorrectTableDataFormat("Row $rowIndex has a string key ($cellIndex) but the value is not iterable."); }