Skip to content
Browse files

Throw if they attempt to use nyancat without the dependencies

  • Loading branch information...
1 parent c46848a commit 1b1be4b4f9c73443ddc9cbb6d32ca10e0e78c83a @davedevelopment committed Jun 21, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/DSpec/Formatter/NyanCat.php
View
4 src/DSpec/Formatter/NyanCat.php
@@ -33,6 +33,10 @@ class NyanCat extends AbstractFormatter implements FormatterInterface
{
public function __construct()
{
+ if (!class_exists("NyanCat\Scoreboard")) {
+ throw new \InvalidArgumentException("The NyanCat formatter requires the whatthejeff/nyancat-scoreboard library");
+ }
+
$this->scoreboard = new Scoreboard(
new Cat(),
new Rainbow(

0 comments on commit 1b1be4b

Please sign in to comment.
Something went wrong with that request. Please try again.