Download project

This commit is contained in:
Roman Pyrih
2024-11-20 09:09:44 +01:00
parent 547a138d6a
commit 5ff041757f
40737 changed files with 7766183 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace League\Tactician\Exception;
/**
* Thrown when the command bus is given an non-object to use as a command.
*/
class InvalidCommandException extends \RuntimeException implements Exception
{
/**
* @var mixed
*/
private $invalidCommand;
/**
* @param mixed $invalidCommand
*
* @return static
*/
public static function forUnknownValue($invalidCommand)
{
$exception = new static(
'Commands must be an object but the value given was of type: ' . gettype($invalidCommand)
);
$exception->invalidCommand = $invalidCommand;
return $exception;
}
/**
* @return mixed
*/
public function getInvalidCommand()
{
return $this->invalidCommand;
}
}