protected function contentIsFileInfo($file, string $method = 'getStream') : bool
    {
        if (! $file instanceof \SplFileInfo) {
            $message = 'The "%s::%s" expect the file array key to be an instance of "%s". "%s" given';
            $givenType = (is_object($file) ? get_class($file) : gettype($file));

            throw new \RuntimeException(sprintf($message, static::class, $method, \SplFileInfo::class, $givenType));
        }

        return true;
    }
protected function contentIsFileInfo($file, string $method = 'getStream') : bool
    {
        if (! $file instanceof \SplFileInfo) {
            $message = 'The "%s::%s" expect the file array key to be an instance of "%s". "%s" given';
            $givenType = (is_object($file) ? get_class($file) : gettype($file));

            throw new \RuntimeException(sprintf($message, static::class, $method, \SplFileInfo::class, $givenType));
        }

        return true;
    }
protected function contentIsFileInfo ( $ file , string $ method = 'getStream' ) : bool { if ( ! $ file instanceof \ SplFileInfo ) { $ message = 'The "%s::%s" expect the file array key to be an instance of "%s". "%s" given' ; $ givenType = ( is_object ( $ file ) ? get_class ( $ file ) : gettype ( $ file ) ) ; throw new \ RuntimeException ( sprintf ( $ message , static :: class , $ method , \ SplFileInfo :: class , $ givenType ) ) ; } return true ; }
Content is FileInfo

This method validate the instance of the given content parameter. This type is expected to be SplFileInfo.

@param mixed  $file   The file which the method aim to validate the type
@param string $method The original method name. This parameter is used to define the exception message

@throws \RuntimeException If the given content does not match the expected type
@return bool
Content is FileInfo