<?php

namespace WPDT\PhpOffice\PhpSpreadsheet\Reader\Xlsx;

class BaseParserClass
{
    /**
     * @param mixed $value
     */
    protected static function boolean($value) : bool
    {
        if (\is_object($value)) {
            $value = (string) $value;
            // @phpstan-ignore-line
        }
        if (\is_numeric($value)) {
            return (bool) $value;
        }
        return $value === 'true' || $value === 'TRUE';
    }
}
