private function boolishToFlag($value): bool
    {
        switch (true) {
            case 'true' === $value:
            case true === $value:
            case 'yes' === $value:
                return true;
            case 'no' === $value:
            case 'false' === $value:
            case false === $value:
                return false;
            default:
                throw new \InvalidArgumentException('Invalid value for remove-obsolete flag.');
        }
    }
private function boolishToFlag($value): bool
    {
        switch (true) {
            case 'true' === $value:
            case true === $value:
            case 'yes' === $value:
                return true;
            case 'no' === $value:
            case 'false' === $value:
            case false === $value:
                return false;
            default:
                throw new \InvalidArgumentException('Invalid value for remove-obsolete flag.');
        }
    }
private function boolishToFlag ( $ value ) : bool { switch ( true ) { case 'true' === $ value : case true === $ value : case 'yes' === $ value : return true ; case 'no' === $ value : case 'false' === $ value : case false === $ value : return false ; default : throw new \ InvalidArgumentException ( 'Invalid value for remove-obsolete flag.' ) ; } }
Convert the passed value to a bool.

@param string|bool|null $value The value.

@return bool

@throws \InvalidArgumentException When the value can not be converted.
Convert the passed value to a bool .