for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Movies\DTO;
class MovieTranslationDTO
{
private $locale, $title, $overview, $posterUrl;
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.
public function __construct(string $locale, string $title, ?string $overview, ?string $posterUrl)
$this->locale = $locale;
$this->title = $title;
$this->overview = $overview;
$this->posterUrl = $posterUrl;
}
/**
* @return string
*/
public function getLocale(): string
return $this->locale;
public function getTitle(): string
return $this->title;
* @return null|string
public function getOverview(): ?string
return $this->overview;
public function getPosterUrl(): ?string
return $this->posterUrl;
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.