public static function isAttachment(WP_Post $post, string $message = null): void
    {
        $postType = $post->post_type;
        'attachment' === $postType or static::reportInvalidArgument(
            $message ?: "Expected Post be an Attachment. Type of {$postType} Given."
        );
    }
public static function isAttachment(WP_Post $post, string $message = null): void
    {
        $postType = $post->post_type;
        'attachment' === $postType or static::reportInvalidArgument(
            $message ?: "Expected Post be an Attachment. Type of {$postType} Given."
        );
    }
public static function isAttachment ( WP_Post $ post , string $ message = null ) : void { $ postType = $ post -> post_type ; 'attachment' === $ postType or static :: reportInvalidArgument ( $ message ? : "Expected Post be an Attachment. Type of {$postType} Given." ) ; }
Assert a WP_Post Entity is an Attachment

@param WP_Post $post
@param string|null $message
@throws InvalidArgumentException
Assert a WP_Post Entity is an Attachment