shared; } public function usesStock(): bool { return $this->usesStock; } /** * @throws SharedUnitCannotUseStock */ public function useStock(bool $usesStock): void { if ($usesStock && $this->shared) { throw new SharedUnitCannotUseStock; } $this->usesStock = $usesStock; } }