DAT-2364 Use the value of city_variable instead of object

* Use the value
* Fix PHP strict warning
* Why, oh why PHP doesn't have static typing? :(
DAT-2364 Single function exit point
DAT-2364 Address CR remark to simplify code
Merge pull request #5734 from Wikia/DAT-2364

DAT-2364 Use the value of city_variable instead of object