createdBy = new NullAccount(); $this->createdAt = new \DateTimeImmutable('now'); $this->source = new NullCollection(); } /** * Get id * * @return int * * @since 1.0.0 */ public function getId() : int { return $this->id; } /** * Get settings. * * @return ExchangeSetting[] * * @since 1.0.0 */ public function getSettings() : array { return $this->settings; } /** * Adding new setting. * * @param ExchangeSetting $setting Setting * * @return int * * @since 1.0.0 */ public function addSetting(ExchangeSetting $setting) : int { $this->settings[] = $setting; \end($this->settings); $key = (int) \key($this->settings); \reset($this->settings); return $key; } }