private function stockLocation(array $data) { $this->location = isset($data['location']) ? $data['location'] : self::DEFAULT_LOCATION; if (!AbstractParams::isSupportedLocation($this->location)) { throw new \RuntimeException(sprintf("%s is not a permitted location", $this->location)); } }