for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace VasilDakov\Speedy\Model;
use VasilDakov\Speedy\Property;
use JMS\Serializer\Annotation as Serializer;
/**
* Class Size.
*
* @author Vasil Dakov <[email protected]>
* @copyright 2009-2022 Neutrino.bg
* @version 1.0
*/
class Size
{
* @Serializer\Type("int")
private int $width;
private int $depth;
private int $height;
public function __construct(int $width, int $depth, int $height)
$this->width = $width;
$this->depth = $depth;
$this->height = $height;
}
public function getWidth(): int
return $this->width;
public function setWidth(int $width): void
public function getDepth(): int
return $this->depth;
public function setDepth(int $depth): void
public function getHeight(): int
return $this->height;
public function setHeight(int $height): void
public function toArray(): array
return [
Property::WIDTH->value => $this->getWidth(),
Property::DEPTH->value => $this->getDepth(),
Property::HEIGHT->value => $this->getHeight(),
];