private function copyStringToFlag($value): int
    {
        switch (true) {
            case 'true' === $value:
            case true === $value:
            case 'yes' === $value:
                return CopyDictionaryJob::COPY;
            case 'no' === $value:
            case 'false' === $value:
            case false === $value:
                return CopyDictionaryJob::DO_NOT_COPY;
            case 'if-empty' === $value:
                return CopyDictionaryJob::COPY_IF_EMPTY;
            default:
                throw new \InvalidArgumentException('Invalid value for copy flag.');
        }
    }
private function copyStringToFlag($value): int
    {
        switch (true) {
            case 'true' === $value:
            case true === $value:
            case 'yes' === $value:
                return CopyDictionaryJob::COPY;
            case 'no' === $value:
            case 'false' === $value:
            case false === $value:
                return CopyDictionaryJob::DO_NOT_COPY;
            case 'if-empty' === $value:
                return CopyDictionaryJob::COPY_IF_EMPTY;
            default:
                throw new \InvalidArgumentException('Invalid value for copy flag.');
        }
    }
private function copyStringToFlag ( $ value ) : int { switch ( true ) { case 'true' === $ value : case true === $ value : case 'yes' === $ value : return CopyDictionaryJob :: COPY ; case 'no' === $ value : case 'false' === $ value : case false === $ value : return CopyDictionaryJob :: DO_NOT_COPY ; case 'if-empty' === $ value : return CopyDictionaryJob :: COPY_IF_EMPTY ; default : throw new \ InvalidArgumentException ( 'Invalid value for copy flag.' ) ; } }
Convert the passed value to a copy flag.

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

@return int

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