| Total Complexity | 9 |
| Total Lines | 78 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | #[ORM\Table(name: 'sequence')] |
||
| 16 | #[ORM\Entity(repositoryClass: SequenceRepository::class)] |
||
| 17 | class Sequence implements Stringable |
||
| 18 | { |
||
| 19 | use TimestampableEntity; |
||
| 20 | |||
| 21 | #[ORM\Column(name: 'id', type: 'integer')] |
||
| 22 | #[ORM\Id] |
||
| 23 | #[ORM\GeneratedValue] |
||
| 24 | protected ?int $id = null; |
||
| 25 | |||
| 26 | #[ORM\Column(name: 'title', type: 'string')] |
||
| 27 | protected string $title; |
||
| 28 | |||
| 29 | #[ORM\Column(name: 'graph', type: 'text', nullable: true)] |
||
| 30 | protected ?string $graph = null; |
||
| 31 | |||
| 32 | public function __toString(): string |
||
| 33 | { |
||
| 34 | return $this->title; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return int |
||
| 39 | */ |
||
| 40 | public function getId() |
||
| 41 | { |
||
| 42 | return $this->id; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getTitle() |
||
| 49 | { |
||
| 50 | return $this->title; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function setTitle(string $title): self |
||
| 54 | { |
||
| 55 | $this->title = $title; |
||
| 56 | |||
| 57 | return $this; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | public function getGraph() |
||
| 64 | { |
||
| 65 | return $this->graph; |
||
| 66 | } |
||
| 67 | |||
| 68 | public function setGraph(string $graph): self |
||
| 69 | { |
||
| 70 | $this->graph = $graph; |
||
| 71 | |||
| 72 | return $this; |
||
| 73 | } |
||
| 74 | |||
| 75 | public function hasGraph(): bool |
||
| 76 | { |
||
| 77 | return !empty($this->graph); |
||
| 78 | } |
||
| 79 | |||
| 80 | /** |
||
| 81 | * @return Graph |
||
| 82 | */ |
||
| 83 | public function getUnSerializeGraph() |
||
| 86 | } |
||
| 87 | |||
| 88 | public function setGraphAndSerialize(Graph $graph): self |
||
| 93 | } |
||
| 94 | } |
||
| 95 |