rule = $rule !== null ? $rule : null; $this->price = $price !== null ? (float)$price : null; } }