projectPath = $projectPath; $this->overwrite = $overwrite; } public function describe(Swagger $api) { $annotation = \Swagger\scan($this->projectPath); $api->merge($this->normalize($annotation), $this->overwrite); } private function normalize($annotation) { return json_decode(json_encode($annotation)); } }