for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Happyr\JsonApiResponseFactory\Model;
/**
* @author Radoje Albijanic <[email protected]>
*/
final class Message extends AbstractMeta
{
public function __construct(string $message, int $httpStatusCode)
parent::__construct(['message' => $message], $httpStatusCode);
}
public static function ok(string $message = 'OK'): self
return new self($message, 200);
public static function created(string $message = 'Created'): self
return new self($message, 201);
public static function accepted(string $message = 'Accepted'): self
return new self($message, 202);
public static function noContent(string $message = 'No Content'): self
return new self($message, 204);