| @@ -6,9 +6,8 @@ | ||
| 6 | 6 | |
| 7 | 7 | class Global_Classes { |
| 8 | 8 | private Collection $items; |
| 9 | 9 | private Collection $order; |
| 10 | - private Collection $ordered_items; | |
| 11 | 10 | |
| 12 | 11 | public static function make( array $items = [], array $order = [] ) { |
| 13 | 12 | return new static( $items, $order ); |
| 14 | 13 | } |
| @@ -15,11 +14,8 @@ | ||
| 15 | 14 | |
| 16 | 15 | private function __construct( array $data = [], array $order = [] ) { |
| 17 | 16 | $this->items = Collection::make( $data ); |
| 18 | 17 | $this->order = Collection::make( $order ); |
| 19 | - $this->ordered_items = $this->order | |
| 20 | - ->map( fn( $id ) => $data[ $id ] ?? null ) | |
| 21 | - ->filter( fn( $item ) => null !== $item ); | |
| 22 | 18 | } |
| 23 | 19 | |
| 24 | 20 | public function get_items() { |
| 25 | 21 | return $this->items; |
| @@ -26,12 +22,8 @@ | ||
| 26 | 22 | } |
| 27 | 23 | |
| 28 | 24 | public function get_order() { |
| 29 | 25 | return $this->order; |
| 30 | - } | |
| 31 | - | |
| 32 | - public function get_ordered_items() { | |
| 33 | - return $this->ordered_items; | |
| 34 | 26 | } |
| 35 | 27 | |
| 36 | 28 | public function get() { |
| 37 | 29 | return [ |