src/Incoming/Hydrator/Exception/IncompatibleProcessException.php
public static function forRequiredContextCompatibility(
        $process = null,
        int $code = self::CODE_FOR_REQUIRED_CONTEXT_COMPATIBILITY,
        Throwable $previous = null
    ): self {
        if (self::CODE_FOR_REQUIRED_CONTEXT_COMPATIBILITY === $code) {
            if ($process instanceof Hydrator) {
                $code += self::CODE_FOR_HYDRATOR;
            } elseif ($process instanceof Builder) {
                $code += self::CODE_FOR_BUILDER;
            }
        }

        $message = self::DEFAULT_MESSAGE . self::MESSAGE_EXTENSION_FOR_REQUIRED_CONTEXT_COMPATIBILITY;

        return new static($message, $code, $previous);
    }
public static function forRequiredContextCompatibility(
        $process = null,
        int $code = self::CODE_FOR_REQUIRED_CONTEXT_COMPATIBILITY,
        Throwable $previous = null
    ): self {
        if (self::CODE_FOR_REQUIRED_CONTEXT_COMPATIBILITY === $code) {
            if ($process instanceof Hydrator) {
                $code += self::CODE_FOR_HYDRATOR;
            } elseif ($process instanceof Builder) {
                $code += self::CODE_FOR_BUILDER;
            }
        }

        $message = self::DEFAULT_MESSAGE . self::MESSAGE_EXTENSION_FOR_REQUIRED_CONTEXT_COMPATIBILITY;

        return new static($message, $code, $previous);
    }
public static function forRequiredContextCompatibility ( $ process = null , int $ code = self :: CODE_FOR_REQUIRED_CONTEXT_COMPATIBILITY , Throwable $ previous = null ) : self { if ( self :: CODE_FOR_REQUIRED_CONTEXT_COMPATIBILITY === $ code ) { if ( $ process instanceof Hydrator ) { $ code += self :: CODE_FOR_HYDRATOR ; } elseif ( $ process instanceof Builder ) { $ code += self :: CODE_FOR_BUILDER ; } } $ message = self :: DEFAULT_MESSAGE . self :: MESSAGE_EXTENSION_FOR_REQUIRED_CONTEXT_COMPATIBILITY ; return new static ( $ message , $ code , $ previous ) ; }
Create an exception instance for when context compatibility is required.

@param object|null $process The incompatible process.
@param int $code The exception code.
@param Throwable|null $previous A previous exception used for chaining.
@return static The newly created exception.
Create an exception instance for when context compatibility is required .