mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Apply fixes from StyleCI (#13208)
This commit is contained in:
@@ -38,7 +38,7 @@ class BingApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Get latitude and longitude from geocode response
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
protected function parseLatLng($data)
|
||||
@@ -52,7 +52,7 @@ class BingApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Build Guzzle request option array
|
||||
*
|
||||
* @param string $address
|
||||
* @param string $address
|
||||
* @return array
|
||||
* @throws \Exception you may throw an Exception if validation fails
|
||||
*/
|
||||
@@ -74,8 +74,8 @@ class BingApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Checks if the request was a success
|
||||
*
|
||||
* @param \Psr\Http\Message\ResponseInterface $response
|
||||
* @param array $data decoded response data
|
||||
* @param \Psr\Http\Message\ResponseInterface $response
|
||||
* @param array $data decoded response data
|
||||
* @return bool
|
||||
*/
|
||||
protected function checkResponse($response, $data)
|
||||
|
@@ -40,7 +40,7 @@ trait GeocodingHelper
|
||||
* Try to get the coordinates of a given address.
|
||||
* If unsuccessful, the returned array will be empty
|
||||
*
|
||||
* @param string $address
|
||||
* @param string $address
|
||||
* @return array ['lat' => 0, 'lng' => 0]
|
||||
*/
|
||||
public function getCoordinates($address)
|
||||
@@ -71,8 +71,8 @@ trait GeocodingHelper
|
||||
/**
|
||||
* Checks if the request was a success
|
||||
*
|
||||
* @param \Psr\Http\Message\ResponseInterface $response
|
||||
* @param array $data decoded response data
|
||||
* @param \Psr\Http\Message\ResponseInterface $response
|
||||
* @param array $data decoded response data
|
||||
* @return bool
|
||||
*/
|
||||
protected function checkResponse($response, $data)
|
||||
@@ -83,7 +83,7 @@ trait GeocodingHelper
|
||||
/**
|
||||
* Get latitude and longitude from geocode response
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function parseLatLng($data);
|
||||
@@ -91,7 +91,7 @@ trait GeocodingHelper
|
||||
/**
|
||||
* Build Guzzle request option array
|
||||
*
|
||||
* @param string $address
|
||||
* @param string $address
|
||||
* @return array
|
||||
* @throws \Exception you may throw an Exception if validation fails
|
||||
*/
|
||||
|
@@ -38,7 +38,7 @@ class GoogleMapsApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Get latitude and longitude from geocode response
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
protected function parseLatLng($data)
|
||||
@@ -52,7 +52,7 @@ class GoogleMapsApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Get messages from response.
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
protected function parseMessages($data)
|
||||
@@ -66,7 +66,7 @@ class GoogleMapsApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Build Guzzle request option array
|
||||
*
|
||||
* @param string $address
|
||||
* @param string $address
|
||||
* @return array
|
||||
* @throws \Exception you may throw an Exception if validation fails
|
||||
*/
|
||||
@@ -88,8 +88,8 @@ class GoogleMapsApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Checks if the request was a success
|
||||
*
|
||||
* @param \Psr\Http\Message\ResponseInterface $response
|
||||
* @param array $data decoded response data
|
||||
* @param \Psr\Http\Message\ResponseInterface $response
|
||||
* @param array $data decoded response data
|
||||
* @return bool
|
||||
* @throws Exception you may throw an Exception if validation fails
|
||||
*/
|
||||
|
@@ -72,12 +72,12 @@ class GraylogApi
|
||||
/**
|
||||
* Query the Graylog server
|
||||
*
|
||||
* @param string $query
|
||||
* @param int $range
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string $sort field:asc or field:desc
|
||||
* @param string $filter
|
||||
* @param string $query
|
||||
* @param int $range
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string $sort field:asc or field:desc
|
||||
* @param string $filter
|
||||
* @return array
|
||||
*/
|
||||
public function query($query = '*', $range = 0, $limit = 0, $offset = 0, $sort = null, $filter = null)
|
||||
@@ -109,8 +109,8 @@ class GraylogApi
|
||||
/**
|
||||
* Build a simple query string that searches the messages field and/or filters by device
|
||||
*
|
||||
* @param string $search Search the message field for this string
|
||||
* @param Device $device
|
||||
* @param string $search Search the message field for this string
|
||||
* @param Device $device
|
||||
* @return string
|
||||
*/
|
||||
public function buildSimpleQuery($search = null, $device = null)
|
||||
|
@@ -38,7 +38,7 @@ class MapquestApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Get latitude and longitude from geocode response
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
protected function parseLatLng($data)
|
||||
@@ -52,7 +52,7 @@ class MapquestApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Build Guzzle request option array
|
||||
*
|
||||
* @param string $address
|
||||
* @param string $address
|
||||
* @return array
|
||||
* @throws \Exception you may throw an Exception if validation fails
|
||||
*/
|
||||
@@ -75,8 +75,8 @@ class MapquestApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Checks if the request was a success
|
||||
*
|
||||
* @param \Psr\Http\Message\ResponseInterface $response
|
||||
* @param array $data decoded response data
|
||||
* @param \Psr\Http\Message\ResponseInterface $response
|
||||
* @param array $data decoded response data
|
||||
* @return bool
|
||||
*/
|
||||
protected function checkResponse($response, $data)
|
||||
|
@@ -36,7 +36,7 @@ class NominatimApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Get latitude and longitude from geocode response
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
protected function parseLatLng($data)
|
||||
@@ -50,7 +50,7 @@ class NominatimApi extends BaseApi implements Geocoder
|
||||
/**
|
||||
* Build Guzzle request option array
|
||||
*
|
||||
* @param string $address
|
||||
* @param string $address
|
||||
* @return array
|
||||
* @throws \Exception you may throw an Exception if validation fails
|
||||
*/
|
||||
|
@@ -37,7 +37,7 @@ class RipeApi extends BaseApi
|
||||
/**
|
||||
* Get whois info
|
||||
*
|
||||
* @param string $resource ASN/IPv4/IPv6
|
||||
* @param string $resource ASN/IPv4/IPv6
|
||||
* @return array
|
||||
* @throws ApiException
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ class RipeApi extends BaseApi
|
||||
/**
|
||||
* Get Abuse contact
|
||||
*
|
||||
* @param string $resource prefix, single IP address or ASN
|
||||
* @param string $resource prefix, single IP address or ASN
|
||||
* @return array|mixed
|
||||
* @throws ApiException
|
||||
*/
|
||||
|
Reference in New Issue
Block a user