Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -1,86 +1,94 @@
<?php namespace LaravelFCM\Mocks;
<?php
namespace LaravelFCM\Mocks;
use LaravelFCM\Response\TopicResponseContract;
/**
* Class MockTopicResponse **Only use it for testing**
*
* @package LaravelFCM\Response
* Class MockTopicResponse **Only use it for testing**.
*/
class MockTopicResponse implements TopicResponseContract {
class MockTopicResponse implements TopicResponseContract
{
/**
* @internal
*
* @var string
*/
protected $topic;
/**
* @internal
*
* @var string
*/
protected $messageId;
/**
* @internal
* @var string
*/
protected $topic;
/**
* @internal
*
* @var string
*/
protected $error;
/**
* @internal
* @var string
*/
protected $messageId;
/**
* @internal
*
* @var bool
*/
protected $needRetry = false;
/**
* @internal
* @var string
*/
protected $error;
/**
* if success set a message id.
*
* @param $messageId
* @return MockTopicResponse
*/
public function setSuccess($messageId)
{
$this->messageId = $messageId;
return $this;
}
/**
* @internal
* @var bool
*/
protected $needRetry = false;
/**
* true if topic sent with success.
*
* @return bool
*/
public function isSuccess()
{
return (bool) $this->messageId;
}
/**
* if success set a message id
*
* @param $messageId
*/
public function setSuccess($messageId)
{
$this->messageId = $messageId;
}
/**
* set error.
*
* @param $error
* @return MockTopicResponse
*/
public function setError($error)
{
$this->error = $error;
return $this;
}
/**
* true if topic sent with success
*
* @return bool
*/
public function isSuccess()
{
return (bool) $this->messageId;
}
/**
* return error message
* you should test if it's necessary to resent it.
*
* @return string error
*/
public function error()
{
$this->error;
}
/**
* set error
* @param $error
*/
public function setError($error)
{
$this->error = $error;
}
/**
* return error message
* you should test if it's necessary to resent it
*
* @return string error
*/
public function error()
{
$this->error;
}
/**
* return true if it's necessary resent it using exponential backoff
*
* @return bool
*/
public function shouldRetry()
{
$this->error;
}
}
/**
* return true if it's necessary resent it using exponential backoff.
*
* @return bool
*/
public function shouldRetry()
{
$this->error;
}
}