feat,refac: 경매장 재설계, 유니크 경매장 구현 #221

Merged
Hide_D merged 23 commits from ng_auction into devel 2022-06-09 01:21:55 +09:00
Showing only changes of commit 30401382fd - Show all commits
+11 -4
View File
@@ -78,11 +78,18 @@ class DefaultConverter implements Converter
return $raw;
}
if($type === 'bool' && is_bool($raw)){
$success = true;
return $raw;
if($type === 'bool'){
if(is_bool($raw)){
$success = true;
return $raw;
}
if($raw === 0 || $raw === 1){
$success = true;
return $raw !== 0;
}
}
return null;
}
@@ -100,7 +107,7 @@ class DefaultConverter implements Converter
}
}
throw new \Exception('DefaultConverter can not convert');
throw new \Exception('DefaultConverter can not convert '.gettype($raw));
}
public function convertTo(mixed $data): string|array|int|float|bool|null