Add ip restriction configuration option
Fixed coding style to be PSR compliant