Created
April 27, 2018 14:01
-
-
Save lchrusciel/ee95a100d0ca5ce7b7e5eb79cf0df6f2 to your computer and use it in GitHub Desktop.
Sample ProductBundle class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/AppBundle/Entity/ProductBundle.php | |
<?php | |
declare(strict_types=1); | |
namespace AppBundle\Entity; | |
use Sylius\Component\Resource\Model\ResourceInterface; | |
class ProductBundle implements ResourceInterface | |
{ | |
/** @var int */ | |
private $id; | |
/** @var string|null */ | |
private $name; | |
/** @var string|null */ | |
private $code; | |
public function getId() // Missing return type due to ResourceInterface restrictions | |
{ | |
return $this->id; | |
} | |
public function getName(): ?string | |
{ | |
return $this->name; | |
} | |
public function setName(?string $name): void | |
{ | |
$this->name = $name; | |
} | |
public function getCode(): ?string | |
{ | |
return $this->code; | |
} | |
public function setCode(?string $code): void | |
{ | |
$this->code = $code; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment