for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the fnayou/instapush-php project.
*
* Copyright (c) 2017. Aymen FNAYOU <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fnayou\InstapushPHP\Model;
* Class ApiError.
class ApiError implements FromArrayInterface
{
/** @var string */
private $message;
private $status;
* @param string $message
* @param string $status
public function __construct(
string $message,
string $status
) {
$this
->setMessage($message)
->setStatus($status);
}
* @return string
public function getMessage()
return $this->message;
* @return $this
public function setMessage(string $message)
$this->message = $message;
return $this;
public function getStatus()
return $this->status;
public function setStatus(string $status)
$this->status = $status;
* {@inheritdoc}
public static function fromArray(array $data)
return new static(
$data['msg'],
$data['status']
);