src/Client.php
private function prepareAttachments($attachments = null)
    {
        $file_params = [];

        if ($attachments) {
            $counter = 1;

            foreach ($attachments as $attachment) {
                $path = is_array($attachment) ? $attachment[0] : $attachment;

                if (is_readable($path)) {
                    $file_params['attachment_'.$counter++] = $attachment;
                } else {
                    throw new FileNotReadable($attachment);
                }
            }
        }

        return $file_params;
    }
private function prepareAttachments($attachments = null)
    {
        $file_params = [];

        if ($attachments) {
            $counter = 1;

            foreach ($attachments as $attachment) {
                $path = is_array($attachment) ? $attachment[0] : $attachment;

                if (is_readable($path)) {
                    $file_params['attachment_'.$counter++] = $attachment;
                } else {
                    throw new FileNotReadable($attachment);
                }
            }
        }

        return $file_params;
    }
private function prepareAttachments ( $ attachments = null ) { $ file_params = [ ] ; if ( $ attachments ) { $ counter = 1 ; foreach ( $ attachments as $ attachment ) { $ path = is_array ( $ attachment ) ? $ attachment [ 0 ] : $ attachment ; if ( is_readable ( $ path ) ) { $ file_params [ 'attachment_' . $ counter ++ ] = $ attachment ; } else { throw new FileNotReadable ( $ attachment ) ; } } } return $ file_params ; }
Prepare attachments for request.

@param array|null $attachments

@return array|null

@throws Exceptions\FileNotReadable
Prepare attachments for request .