@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | - * @param \Zend\Mvc\Router\RouteInterface $httpRoute |
|
| 94 | + * @param \Zend\Mvc\Router\RouteInterface $httpRouter |
|
| 95 | 95 | * |
| 96 | - * @return Renderer |
|
| 96 | + * @return GeolocationRenderer |
|
| 97 | 97 | */ |
| 98 | 98 | public function setHttpRouter(RouteInterface $httpRouter) |
| 99 | 99 | { |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | /** |
| 114 | 114 | * @param \Zend\StdLib\AbstractOptions $options |
| 115 | 115 | * |
| 116 | - * @return Renderer |
|
| 116 | + * @return GeolocationRenderer |
|
| 117 | 117 | */ |
| 118 | 118 | public function setOptions(AbstractOptions $options = null) |
| 119 | 119 | { |
@@ -42,13 +42,13 @@ |
||
| 42 | 42 | { |
| 43 | 43 | public function __construct() |
| 44 | 44 | { |
| 45 | - $events = StaticEventManager::getInstance (); |
|
| 45 | + $events = StaticEventManager::getInstance(); |
|
| 46 | 46 | |
| 47 | 47 | // Add event of authentication before dispatch |
| 48 | 48 | $events->attach('Zend\View\View', ViewEvent::EVENT_RENDERER_POST, array( |
| 49 | 49 | $this, |
| 50 | 50 | 'preRenderForm' |
| 51 | - ), 110 ); |
|
| 51 | + ), 110); |
|
| 52 | 52 | } |
| 53 | 53 | /** |
| 54 | 54 | * @var \Zend\Mvc\Router\RouteInterface $httpRouter |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * Create service |
| 43 | 43 | * |
| 44 | 44 | * @param ServiceLocatorInterface $serviceLocator |
| 45 | - * @return mixed |
|
| 45 | + * @return FormElement |
|
| 46 | 46 | */ |
| 47 | 47 | public function createService(ServiceLocatorInterface $serviceLocator) |
| 48 | 48 | { |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | * |
| 44 | 44 | * @param ServiceLocatorInterface $serviceLocator |
| 45 | 45 | * |
| 46 | - * @return \OrgHeiglGeolocation\Renderer\GeolocationRenderer |
|
| 46 | + * @return GeolocationRenderer |
|
| 47 | 47 | */ |
| 48 | 48 | public function createService(ServiceLocatorInterface $serviceLocator) |
| 49 | 49 | { |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | */ |
| 78 | 78 | public function isValid($value) |
| 79 | 79 | { |
| 80 | - if (! preg_match('/(?P<lat>[-]?\d{1,2}(\.\d+)?)\D+(?P<lon>[-]?\d{1,3}(\.\d+)?)/', $value, $result)) { |
|
| 80 | + if (!preg_match('/(?P<lat>[-]?\d{1,2}(\.\d+)?)\D+(?P<lon>[-]?\d{1,3}(\.\d+)?)/', $value, $result)) { |
|
| 81 | 81 | $this->error(self::INVALID_FORMAT); |
| 82 | 82 | return false; |
| 83 | 83 | } |
@@ -34,7 +34,6 @@ |
||
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * Class Geolocation |
| 37 | - |
|
| 38 | 37 | * |
| 39 | 38 | *@package OrgHeiglGeolocation\Filter |
| 40 | 39 | */ |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function filter($value) |
| 53 | 53 | { |
| 54 | - if (! preg_match('/(?P<lat>[-]?\d{1,2}(\.\d+)?)\D+?(?P<lon>[-]?\d{1,3}(\.\d+)?)/', $value, $result)) { |
|
| 54 | + if (!preg_match('/(?P<lat>[-]?\d{1,2}(\.\d+)?)\D+?(?P<lon>[-]?\d{1,3}(\.\d+)?)/', $value, $result)) { |
|
| 55 | 55 | trigger_error( |
| 56 | 56 | sprintf( |
| 57 | 57 | 'The give value "%1$s" can not be resolved to a geolocation', |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | $longitude = fmod($longitude, 360.0); |
| 70 | 70 | if ($longitude > 180) { |
| 71 | - $longitude = ($longitude - 180)-180; |
|
| 71 | + $longitude = ($longitude - 180) - 180; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | if ($longitude < -180) { |
@@ -52,13 +52,13 @@ |
||
| 52 | 52 | // |
| 53 | 53 | public function getAutoloaderConfig() |
| 54 | 54 | { |
| 55 | - return array( |
|
| 56 | - 'Zend\Loader\StandardAutoloader' => array( |
|
| 57 | - 'namespaces' => array( |
|
| 58 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
| 59 | - ), |
|
| 60 | - ), |
|
| 61 | - ); |
|
| 55 | + return array( |
|
| 56 | + 'Zend\Loader\StandardAutoloader' => array( |
|
| 57 | + 'namespaces' => array( |
|
| 58 | + __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
| 59 | + ), |
|
| 60 | + ), |
|
| 61 | + ); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |