Skip to content

Commit

Permalink
Reflow some text
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Jan 2, 2024
1 parent 45b88f7 commit ffe95d4
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 89 deletions.
51 changes: 17 additions & 34 deletions src/Database/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ class Reader implements ProviderInterface
* @param array $locales list of locale codes to use in name property
* from most preferred to least preferred
*
* @throws InvalidDatabaseException if the database
* is corrupt or invalid
* @throws InvalidDatabaseException if the database is corrupt or invalid
*/
public function __construct(
string $filename,
Expand All @@ -76,10 +75,8 @@ public function __construct(
*
* @param string $ipAddress an IPv4 or IPv6 address as a string
*
* @throws AddressNotFoundException if the address is
* not in the database
* @throws InvalidDatabaseException if the database
* is corrupt or invalid
* @throws AddressNotFoundException if the address is not in the database
* @throws InvalidDatabaseException if the database is corrupt or invalid
*/
public function city(string $ipAddress): City
{
Expand All @@ -91,10 +88,8 @@ public function city(string $ipAddress): City
*
* @param string $ipAddress an IPv4 or IPv6 address as a string
*
* @throws AddressNotFoundException if the address is
* not in the database
* @throws InvalidDatabaseException if the database
* is corrupt or invalid
* @throws AddressNotFoundException if the address is not in the database
* @throws InvalidDatabaseException if the database is corrupt or invalid
*/
public function country(string $ipAddress): Country
{
Expand All @@ -106,10 +101,8 @@ public function country(string $ipAddress): Country
*
* @param string $ipAddress an IPv4 or IPv6 address as a string
*
* @throws AddressNotFoundException if the address is
* not in the database
* @throws InvalidDatabaseException if the database
* is corrupt or invalid
* @throws AddressNotFoundException if the address is not in the database
* @throws InvalidDatabaseException if the database is corrupt or invalid
*/
public function anonymousIp(string $ipAddress): AnonymousIp
{
Expand All @@ -125,10 +118,8 @@ public function anonymousIp(string $ipAddress): AnonymousIp
*
* @param string $ipAddress an IPv4 or IPv6 address as a string
*
* @throws AddressNotFoundException if the address is
* not in the database
* @throws InvalidDatabaseException if the database
* is corrupt or invalid
* @throws AddressNotFoundException if the address is not in the database
* @throws InvalidDatabaseException if the database is corrupt or invalid
*/
public function asn(string $ipAddress): Asn
{
Expand All @@ -144,10 +135,8 @@ public function asn(string $ipAddress): Asn
*
* @param string $ipAddress an IPv4 or IPv6 address as a string
*
* @throws AddressNotFoundException if the address is
* not in the database
* @throws InvalidDatabaseException if the database
* is corrupt or invalid
* @throws AddressNotFoundException if the address is not in the database
* @throws InvalidDatabaseException if the database is corrupt or invalid
*/
public function connectionType(string $ipAddress): ConnectionType
{
Expand All @@ -163,10 +152,8 @@ public function connectionType(string $ipAddress): ConnectionType
*
* @param string $ipAddress an IPv4 or IPv6 address as a string
*
* @throws AddressNotFoundException if the address is
* not in the database
* @throws InvalidDatabaseException if the database
* is corrupt or invalid
* @throws AddressNotFoundException if the address is not in the database
* @throws InvalidDatabaseException if the database is corrupt or invalid
*/
public function domain(string $ipAddress): Domain
{
Expand All @@ -182,10 +169,8 @@ public function domain(string $ipAddress): Domain
*
* @param string $ipAddress an IPv4 or IPv6 address as a string
*
* @throws AddressNotFoundException if the address is
* not in the database
* @throws InvalidDatabaseException if the database
* is corrupt or invalid
* @throws AddressNotFoundException if the address is not in the database
* @throws InvalidDatabaseException if the database is corrupt or invalid
*/
public function enterprise(string $ipAddress): Enterprise
{
Expand All @@ -197,10 +182,8 @@ public function enterprise(string $ipAddress): Enterprise
*
* @param string $ipAddress an IPv4 or IPv6 address as a string
*
* @throws AddressNotFoundException if the address is
* not in the database
* @throws InvalidDatabaseException if the database
* is corrupt or invalid
* @throws AddressNotFoundException if the address is not in the database
* @throws InvalidDatabaseException if the database is corrupt or invalid
*/
public function isp(string $ipAddress): Isp
{
Expand Down
29 changes: 16 additions & 13 deletions src/Model/City.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,19 @@
class City extends Country
{
/**
* @var City city data for the requested IP
* address
* @var City city data for the requested IP address
*/
public readonly \GeoIp2\Record\City $city;

/**
* @var Location location data for the
* requested IP address
* @var Location location data for the requested IP address
*/
public readonly \GeoIp2\Record\Location $location;

/**
* @var Subdivision An object
* representing the most specific subdivision returned. If the response
* did not contain any subdivisions, this method returns an empty
* @var Subdivision An object representing the most specific subdivision
* returned. If the response did not contain any
* subdivisions, this method returns an empty
* \GeoIp2\Record\Subdivision object.
*/
public readonly \GeoIp2\Record\Subdivision $mostSpecificSubdivision;
Expand All @@ -46,12 +44,17 @@ class City extends Country

/**
* @var array<\GeoIp2\Record\Subdivision> An array of \GeoIp2\Record\Subdivision
* objects representing the country subdivisions for the requested IP
* address. The number and type of subdivisions varies by country, but a
* subdivision is typically a state, province, county, etc. Subdivisions
* are ordered from most general (largest) to most specific (smallest).
* If the response did not contain any subdivisions, this method returns
* an empty array.
* objects representing the country
* subdivisions for the requested IP
* address. The number and type of
* subdivisions varies by country,
* but a subdivision is typically a
* state, province, county, etc.
* Subdivisions are ordered from most
* general (largest) to most specific
* (smallest). If the response did
* not contain any subdivisions, this
* method returns an empty array.
*/
public readonly array $subdivisions;

Expand Down
30 changes: 14 additions & 16 deletions src/Model/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,40 @@
class Country implements \JsonSerializable
{
/**
* @var Continent continent data for the
* requested IP address
* @var Continent continent data for the requested IP address
*/
public readonly \GeoIp2\Record\Continent $continent;

/**
* @var Country Country data for the requested
* IP address. This object represents the country where MaxMind believes the
* end user is located.
* @var Country Country data for the requested IP address. This object
* represents the country where MaxMind believes the end user
* is located.
*/
public readonly \GeoIp2\Record\Country $country;

/**
* @var MaxMind data related to your MaxMind
* account
* @var MaxMind data related to your MaxMind account
*/
public readonly \GeoIp2\Record\MaxMind $maxmind;

/**
* @var Country Registered country
* data for the requested IP address. This record represents the country
* where the ISP has registered a given IP block and may differ from the
* user's country.
* @var Country Registered country data for the requested IP address. This
* record represents the country where the ISP has registered
* a given IP block and may differ from the user's country.
*/
public readonly \GeoIp2\Record\Country $registeredCountry;

/**
* @var RepresentedCountry * Represented country data for the requested IP address. The represented
* country is used for things like military bases. It is only present when
* the represented country differs from the country.
* @var RepresentedCountry Represented country data for the requested IP
* address. The represented country is used for
* things like military bases. It is only present
* when the represented country differs from the
* country.
*/
public readonly \GeoIp2\Record\RepresentedCountry $representedCountry;

/**
* @var Traits data for the traits of the
* requested IP address
* @var Traits data for the traits of the requested IP address
*/
public readonly \GeoIp2\Record\Traits $traits;

Expand Down
49 changes: 23 additions & 26 deletions src/WebService/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,14 @@ private function userAgent(): string
* address is provided, the address that the web service is called
* from will be used.
*
* @throws AddressNotFoundException if the address you
* provided is not in our database (e.g., a private address).
* @throws AuthenticationException if there is a problem
* with the account ID or license key that you provided
* @throws OutOfQueriesException if your account is out
* of queries
* @throws InvalidRequestException} if your request was received by the web service but is
* invalid for some other reason. This may indicate an issue
* with this API. Please report the error to MaxMind.
* @throws AddressNotFoundException if the address you provided is not in our database (e.g.,
* a private address).
* @throws AuthenticationException if there is a problem with the account ID or license key
* that you provided
* @throws OutOfQueriesException if your account is out of queries
* @throws InvalidRequestException if your request was received by the web service but is
* invalid for some other reason. This may indicate an issue
* with this API. Please report the error to MaxMind.
* @throws HttpException if an unexpected HTTP error code or message was returned.
* This could indicate a problem with the connection between
* your server and the web service or that the web service
Expand All @@ -151,14 +150,13 @@ public function city(string $ipAddress = 'me'): City
* address is provided, the address that the web service is called
* from will be used.
*
* @throws AddressNotFoundException if the address you provided is not in our database (e.g.,
* a private address).
* @throws AuthenticationException if there is a problem
* with the account ID or license key that you provided
* @throws OutOfQueriesException if your account is out of queries
* @throws InvalidRequestException} if your request was received by the web service but is
* invalid for some other reason. This may indicate an
* issue with this API. Please report the error to MaxMind.
* @throws AddressNotFoundException if the address you provided is not in our database (e.g.,
* a private address).
* @throws AuthenticationException if there is a problem with the account ID or license key that you provided
* @throws OutOfQueriesException if your account is out of queries
* @throws InvalidRequestException if your request was received by the web service but is
* invalid for some other reason. This may indicate an
* issue with this API. Please report the error to MaxMind.
* @throws HttpException if an unexpected HTTP error
* code or message was returned. This could indicate a problem
* with the connection between your server and the web service
Expand All @@ -183,15 +181,14 @@ public function country(string $ipAddress = 'me'): Country
* address is provided, the address that the web service is called
* from will be used.
*
* @throws AddressNotFoundException if the address you
* provided is not in our database (e.g., a private address).
* @throws AuthenticationException if there is a problem
* with the account ID or license key that you provided
* @throws OutOfQueriesException if your account is out
* of queries
* @throws InvalidRequestException} if your request was received by the web service but is
* invalid for some other reason. This may indicate an
* issue with this API. Please report the error to MaxMind.
* @throws AddressNotFoundException if the address you provided is not in our database (e.g.,
* a private address).
* @throws AuthenticationException if there is a problem with the account ID or license key
* that you provided
* @throws OutOfQueriesException if your account is out of queries
* @throws InvalidRequestException if your request was received by the web service but is
* invalid for some other reason. This may indicate an
* issue with this API. Please report the error to MaxMind.
* @throws HttpException if an unexpected HTTP error code or message was returned.
* This could indicate a problem with the connection between
* your server and the web service or that the web service
Expand Down

0 comments on commit ffe95d4

Please sign in to comment.