getId(), $post->getName(), $post->getType()->toDisplayString(), ]; $additionalInfo = []; if ($post->getType()->toInteger() != PostType::Youtube) { $additionalInfo = [ file_exists($post->getContentPath()) ? $post->getContentPath() : 'DOES NOT EXIST', $post->getMimeType(), ]; } echo implode("\t", array_merge($info, $additionalInfo)) . PHP_EOL; }