public function bit($subject) : bool
    {
        if (is_bool($subject)) {
            return true;
        }
        if (is_int($subject) || is_string($subject)) {
            return $subject == 0 || $subject == 1;
        }
        return false;
    }
public function bit($subject) : bool
    {
        if (is_bool($subject)) {
            return true;
        }
        if (is_int($subject) || is_string($subject)) {
            return $subject == 0 || $subject == 1;
        }
        return false;
    }
public function bit ( $ subject ) : bool { if ( is_bool ( $ subject ) ) { return true ; } if ( is_int ( $ subject ) || is_string ( $ subject ) ) { return $ subject == 0 || $ subject == 1 ; } return false ; }
Boolean or integer 0|1.

@param $subject
bool|int to pass validation.

@return bool
Boolean or integer 0|1 .