@param null $message

@return static
488773
public static function invalidArgument($message = null)
    {
        $defaultMessage = sprintf('Invalid argument passed in GameParameters.');
        $message = null === $message ? $defaultMessage : $message;

        return new static($message);
    }
182402
public static function playerStillNeedsToAct(Player $player, $message = null)
    {
        $defaultMessage = sprintf('%s still needs to act.', $player);
        $message = null === $message ? $defaultMessage : $message;

        return new static($message);
    }
25834
public function setErrorMessage($message)
    {
        switch (gettype($message)) {
            case 'string':
                $this->errorMessage = trim($message);
                break;
            case 'array':
                $this->errorMessage = empty($message) ? '' : $message;
                break;
            default:
                $this->errorMessage = '';
                break;
        }

        return $this;
    }
864173
public static function warning($message = null, $name = null)
    {
        return self::generic($message, WarningMessage::$CSSClass, $name);
    }
972919
public function pushHandler($message = null)
    {
        $this->handle();

        if (\is_callable($message)) {
            $this->response = \call_user_func($message, $this->message);
        }

        if (\is_string($message) and class_exists($message)) {
            $this->messageHandlers[] = $message;
        }

        return $this;
    }
534426
public function setStatusMessage($message)
    {
        if($entity = $this->getIterator()->current()) {
            $entity->setStatusMessage($message);
        }

        return $this;
    }
989054
public static function unexpectedSuit($message = null)
    {
        $defaultMessage = 'Suit was not a reconigsed value, suit should be heart, club, diamond or spade';
        $message = is_null($message) ? $defaultMessage : $message;

        return new static($message);
    }
484878
public function setStatusMessage($message)
    {
        if($row = $this->getIterator()->current()) {
            $row->setStatusMessage($message);
        }

        return $this;
    }
1324229
public function message($message)
    {
        if (is_string($message)) {
            $message = new Text($message);
        }

        $this->message = $message;

        return $this;
    }
910026
public function setStatusMessage($message)
    {
        $message = (string) trim($message);

        if ($message === '') {
            $this->statusMessage = $this->getStatusMessage();
        } else {
            $this->statusMessage = $message;
        }

        return $this;
    }
703183
private function _prepareMessage($message)
    {
        if (is_string($message) || is_numeric($message)) {
            return $message;
        }
        
        if (is_array($message)) {
            return json_encode($message, JSON_UNESCAPED_UNICODE);
        }
        
        return null;
    }
679695
public static function invalidId($message = null)
    {
        $defaultMessage = 'ID passed to the Game must be a valid UUID';
        $message = is_null($message) ? $defaultMessage : $message;

        return new static($message);
    }
163434
public function addMessage($message) {
        $this->message = trim(trim($this->message).NL.$message);
        return $this;
    }
484222
public function integer($message = null)
    {
        $this->setRule(__FUNCTION__, function($val)
                       {
                           return !(filter_var($val, FILTER_VALIDATE_INT) === FALSE);
                       }, $message);
        return $this;
    }
1134915
public function createFromObject($message)
    {
        if (!is_object($message)) {
            throw new InvalidArgumentException('Message must be an object.');
        }

        return $this->create(get_class($message), $message);
    }
739180
public function ping($message = null) {
        return $this->returnCommand(['PING'], null, isset($message) ? [$message] : null);
    }
34392
public static function flopHasBeenDealt($message = null)
    {
        $defaultMessage = 'The Flop has already been dealt!';
        $message = null === $message ? $defaultMessage : $message;

        return new static($message);
    }