for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Yproximite\Api\Model\Article;
use Yproximite\Api\Model\ModelInterface;
/**
* Class ArticleTranslation
*/
class ArticleTranslation implements ModelInterface
{
* @var string
private $locale;
private $title;
* @var string|null
private $body;
private $slug;
* ArticleTranslation constructor.
*
* @param array $data
public function __construct(array $data)
$this->locale = (string) $data['locale'];
$this->title = (string) $data['title'];
$this->body = !empty($data['body']) ? (string) $data['body'] : null;
$this->slug = (string) $data['slug'];
}
* @return string
public function getLocale(): string
return $this->locale;
public function getTitle(): string
return $this->title;
* @return null|string
public function getBody()
return $this->body;
public function getSlug(): string
return $this->slug;