Datatype fix

This commit is contained in:
MarkBaker 2020-11-05 21:20:33 +01:00
parent 86728cb214
commit d558e2ba99
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ class HashTable
*
* @param string $hashCode
*
* @return int Index
* @return false|int Index
*/
public function getIndexForHashCode($hashCode)
{

View File

@ -14,7 +14,7 @@ class Size
public function __construct(string $size)
{
$this->valid = preg_match(self::REGEXP_SIZE_VALIDATION, $size, $matches);
$this->valid = (bool) preg_match(self::REGEXP_SIZE_VALIDATION, $size, $matches);
if ($this->valid) {
$this->size = $matches['size'];
$this->unit = $matches['unit'] ?? 'pt';