From d5c400e8d1f0ea5eca00789d6d076762f82763a1 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Mon, 14 Oct 2024 09:32:55 +0200 Subject: [PATCH] Remove annotations example --- .../working-with-indexed-associations.rst | 3 - .../Market-annotations.php | 74 ------------------- 2 files changed, 77 deletions(-) delete mode 100644 docs/en/tutorials/working-with-indexed-associations/Market-annotations.php diff --git a/docs/en/tutorials/working-with-indexed-associations.rst b/docs/en/tutorials/working-with-indexed-associations.rst index 1b120a2ae4..ac326c4181 100644 --- a/docs/en/tutorials/working-with-indexed-associations.rst +++ b/docs/en/tutorials/working-with-indexed-associations.rst @@ -32,9 +32,6 @@ The code and mappings for the Market entity looks like this: .. literalinclude:: working-with-indexed-associations/Market.php :language: attribute - .. literalinclude:: working-with-indexed-associations/Market-annotations.php - :language: annotation - .. literalinclude:: working-with-indexed-associations/market.xml :language: xml diff --git a/docs/en/tutorials/working-with-indexed-associations/Market-annotations.php b/docs/en/tutorials/working-with-indexed-associations/Market-annotations.php deleted file mode 100644 index 798b49d1d0..0000000000 --- a/docs/en/tutorials/working-with-indexed-associations/Market-annotations.php +++ /dev/null @@ -1,74 +0,0 @@ - - */ - private Collection $stocks; - - public function __construct($name) - { - $this->name = $name; - $this->stocks = new ArrayCollection(); - } - - public function getId(): int|null - { - return $this->id; - } - - public function getName(): string - { - return $this->name; - } - - public function addStock(Stock $stock): void - { - $this->stocks[$stock->getSymbol()] = $stock; - } - - public function getStock($symbol): Stock - { - if (!isset($this->stocks[$symbol])) { - throw new InvalidArgumentException("Symbol is not traded on this market."); - } - - return $this->stocks[$symbol]; - } - - /** @return array */ - public function getStocks(): array - { - return $this->stocks->toArray(); - } -}