Phillips said he wrote everything , but gave Doherty a co-composer credit .
Doherty had inspired the song .
Phillips said he wrote everything , but gave Doherty a co-composer credit because he had inspired the song .