for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Component\Shipping\Model;
use Sylius\Component\Resource\Model\TimestampableTrait;
/**
* @author Paweł Jędrzejewski <[email protected]>
class ShipmentUnit implements ShipmentUnitInterface
{
use TimestampableTrait;
* @var mixed
protected $id;
* @var ShipmentInterface
protected $shipment;
* @var ShippableInterface
protected $shippable;
* @var string
protected $shippingState = ShipmentInterface::STATE_READY;
public function __construct()
$this->createdAt = new \DateTime();
}
* {@inheritdoc}
public function __toString()
return (string) $this->id;
public function getId()
return $this->id;
public function getShipment()
return $this->shipment;
public function setShipment(ShipmentInterface $shipment = null)
$this->shipment = $shipment;
public function getShippable()
return $this->shippable;
public function setShippable(ShippableInterface $shippable)
$this->shippable = $shippable;
public function getShippingState()
return $this->shippingState;
public function setShippingState($state)
$this->shippingState = $state;