Skip to content

Commit

Permalink
Merge pull request #158 from maxmind/greg/fix-lints
Browse files Browse the repository at this point in the history
Fix php-cs-linter checks
  • Loading branch information
horgh authored Jan 2, 2024
2 parents 3051fb2 + 4cb0d63 commit d3ee5bb
Show file tree
Hide file tree
Showing 13 changed files with 115 additions and 103 deletions.
6 changes: 3 additions & 3 deletions src/MinFraud.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ private function validateAndAdd(string $className, string $key, array $values):
* @throws WebServiceException when some other error occurs. This also
* serves as the base class for the above exceptions.
*
* @return \MaxMind\MinFraud\Model\Score minFraud Score model object
* @return Score minFraud Score model object
*/
public function score(): Score
{
Expand All @@ -356,7 +356,7 @@ public function score(): Score
* @throws WebServiceException when some other error occurs. This also
* serves as the base class for the above exceptions.
*
* @return \MaxMind\MinFraud\Model\Insights minFraud Insights model object
* @return Insights minFraud Insights model object
*/
public function insights(): Insights
{
Expand All @@ -378,7 +378,7 @@ public function insights(): Insights
* @throws WebServiceException when some other error occurs. This also
* serves as the base class for the above exceptions.
*
* @return \MaxMind\MinFraud\Model\Factors minFraud Factors model object
* @return Factors minFraud Factors model object
*/
public function factors(): Factors
{
Expand Down
3 changes: 1 addition & 2 deletions src/MinFraud/Model/CreditCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ class CreditCard implements \JsonSerializable
public readonly ?bool $isVirtual;

/**
* @var \MaxMind\MinFraud\Model\Issuer an object containing
* information about the credit card issuer
* @var Issuer an object containing information about the credit card issuer
*/
public readonly Issuer $issuer;

Expand Down
3 changes: 1 addition & 2 deletions src/MinFraud/Model/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
class Email implements \JsonSerializable
{
/**
* @var \MaxMind\MinFraud\Model\EmailDomain an object
* containing information about the email domain
* @var EmailDomain an object containing information about the email domain
*/
public readonly EmailDomain $domain;

Expand Down
6 changes: 3 additions & 3 deletions src/MinFraud/Model/Factors.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
class Factors extends Insights
{
/**
* @var \MaxMind\MinFraud\Model\Subscores an object
* containing scores for many of the individual risk factors that are used to
* calculate the overall risk score
* @var Subscores an object containing scores for many of the individual
* risk factors that are used to calculate the overall risk
* score
*/
public readonly Subscores $subscores;

Expand Down
66 changes: 33 additions & 33 deletions src/MinFraud/Model/Insights.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,83 +10,83 @@
class Insights implements \JsonSerializable
{
/**
* @var \MaxMind\MinFraud\Model\BillingAddress an object
* containing minFraud data related to the billing address used in the
* transaction
* @var BillingAddress an object containing minFraud data related to the
* billing address used in the transaction
*/
public readonly BillingAddress $billingAddress;

/**
* @var \MaxMind\MinFraud\Model\CreditCard an object containing
* minFraud data about the credit card used in the transaction
* @var CreditCard an object containing minFraud data about the credit
* card used in the transaction
*/
public readonly CreditCard $creditCard;

/**
* @var \MaxMind\MinFraud\Model\Device this object contains
* information about the device that MaxMind believes is associated with the
* IP address passed in the request
* @var Device this object contains information about the device that
* MaxMind believes is associated with the IP address passed
* in the request
*/
public readonly Device $device;

/**
* @var \MaxMind\MinFraud\Model\Disposition an object
* containing the disposition set by custom rules
* @var Disposition an object containing the disposition set by custom
* rules
*/
public readonly Disposition $disposition;

/**
* @var \MaxMind\MinFraud\Model\Email this object contains
* information about the email address passed in the request
* @var Email this object contains information about the email address
* passed in the request
*/
public readonly Email $email;

/**
* @var float the approximate US dollar value of the
* funds remaining on your MaxMind account
* @var float the approximate US dollar value of the funds remaining on
* your MaxMind account
*/
public readonly float $fundsRemaining;

/**
* @var string This is a UUID that identifies the minFraud request.
* Please use this ID in bug reports or support requests to MaxMind so that we
* can easily identify a particular request.
* @var string This is a UUID that identifies the minFraud request. Please
* use this ID in bug reports or support requests to MaxMind
* so that we can easily identify a particular request.
*/
public readonly string $id;

/**
* @var \MaxMind\MinFraud\Model\IpAddress an object containing
* GeoIP2 and minFraud Insights information about the geolocated IP address
* @var IpAddress an object containing GeoIP2 and minFraud Insights
* information about the geolocated IP address
*/
public readonly IpAddress $ipAddress;

/**
* @var int the approximate number of queries
* remaining for this service before your account runs out of funds
* @var int the approximate number of queries remaining for this service
* before your account runs out of funds
*/
public readonly int $queriesRemaining;

/**
* @var float This property contains the risk score, from 0.01
* to 99. A higher score indicates a higher risk of fraud. For example, a
* score of 20 indicates a 20% chance that a transaction is fraudulent. We
* never return a risk score of 0, since all transactions have the possibility
* of being fraudulent. Likewise we never return a risk score of 100.
* @var float This property contains the risk score, from 0.01 to 99. A
* higher score indicates a higher risk of fraud. For example, a
* score of 20 indicates a 20% chance that a transaction is
* fraudulent. We never return a risk score of 0, since all
* transactions have the possibility of being fraudulent.
* Likewise we never return a risk score of 100.
*/
public readonly float $riskScore;

/**
* @var \MaxMind\MinFraud\Model\ShippingAddress an object
* containing minFraud data related to the shipping address used in the
* transaction
* @var ShippingAddress an object containing minFraud data related to the
* shipping address used in the transaction
*/
public readonly ShippingAddress $shippingAddress;

/**
* @var array This array contains
* \MaxMind\MinFraud\Model\Warning objects detailing issues with the request
* that was sent, such as invalid or unknown inputs. It is highly recommended
* that you check this array for issues when integrating the web service.
* @var array This array contains \MaxMind\MinFraud\Model\Warning objects
* detailing issues with the request that was sent, such as
* invalid or unknown inputs. It is highly recommended that
* you check this array for issues when integrating the web
* service.
*/
public readonly array $warnings;

Expand Down
73 changes: 41 additions & 32 deletions src/MinFraud/Model/IpAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,92 +5,101 @@
namespace MaxMind\MinFraud\Model;

use GeoIp2\Model\Insights;
use GeoIp2\Record\City;
use GeoIp2\Record\Continent;
use GeoIp2\Record\Country;
use GeoIp2\Record\Postal;
use GeoIp2\Record\RepresentedCountry;
use GeoIp2\Record\Subdivision;
use GeoIp2\Record\Traits;

/**
* Model containing GeoIP2 data and the risk for the IP address.
*/
class IpAddress implements \JsonSerializable
{
/**
* @var \GeoIp2\Record\City city data for the requested IP address
* @var City city data for the requested IP address
*/
public readonly \GeoIp2\Record\City $city;

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

/**
* @var \GeoIp2\Record\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 \GeoIp2\Record\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 \MaxMind\MinFraud\Model\GeoIp2Location location data for the requested IP
* address
* @var GeoIp2Location location data for the requested IP address
*/
public readonly \MaxMind\MinFraud\Model\GeoIp2Location $location;

/**
* @var \GeoIp2\Record\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.
* @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;

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

/**
* @var \GeoIp2\Record\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 float|null This field contains the risk associated with the IP
* address. The value ranges from 0.01 to 99. A higher score indicates a
* higher risk.
* address. The value ranges from 0.01 to 99. A higher
* score indicates a higher risk.
*/
public readonly ?float $risk;

/**
* @var array<IpRiskReason> This array contains
* \MaxMind\MinFraud\Model\IpRiskReason objects identifying the reasons why
* the IP address received the associated risk. This will be an empty array if
* there are no reasons.
* \MaxMind\MinFraud\Model\IpRiskReason objects
* identifying the reasons why the IP address
* received the associated risk. This will be an
* empty array if there are no reasons.
*/
public readonly array $riskReasons;

/**
* @var array 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.
* 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;

/**
* @var \GeoIp2\Record\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
40 changes: 20 additions & 20 deletions src/MinFraud/Model/Score.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,50 @@
class Score implements \JsonSerializable
{
/**
* @var \MaxMind\MinFraud\Model\Disposition an object
* containing the disposition set by custom rules
* @var Disposition an object containing the disposition set by custom
* rules
*/
public readonly Disposition $disposition;

/**
* @var float the approximate US dollar value of the
* funds remaining on your MaxMind account
* @var float the approximate US dollar value of the funds remaining on
* your MaxMind account
*/
public readonly float $fundsRemaining;

/**
* @var string This is a UUID that identifies the minFraud request.
* Please use this ID in bug reports or support requests to MaxMind so that we
* can easily identify a particular request.
* @var string This is a UUID that identifies the minFraud request. Please
* use this ID in bug reports or support requests to MaxMind
* so that we can easily identify a particular request.
*/
public readonly string $id;

/**
* @var \MaxMind\MinFraud\Model\ScoreIpAddress an object
* containing the IP risk for the transaction
* @var ScoreIpAddress an object containing the IP risk for the transaction
*/
public readonly ScoreIpAddress $ipAddress;

/**
* @var int the approximate number of queries
* remaining for this service before your account runs out of funds
* @var int the approximate number of queries remaining for this service
* before your account runs out of funds
*/
public readonly int $queriesRemaining;

/**
* @var float This property contains the risk score, from 0.01
* to 99. A higher score indicates a higher risk of fraud. For example, a
* score of 20 indicates a 20% chance that a transaction is fraudulent. We
* never return a risk score of 0, since all transactions have the possibility
* of being fraudulent. Likewise we never return a risk score of 100.
* @var float This property contains the risk score, from 0.01 to 99. A
* higher score indicates a higher risk of fraud. For example,
* a score of 20 indicates a 20% chance that a transaction is
* fraudulent. We never return a risk score of 0, since all
* transactions have the possibility of being fraudulent.
* Likewise we never return a risk score of 100.
*/
public readonly float $riskScore;

/**
* @var array This array contains
* \MaxMind\MinFraud\Model\Warning objects detailing issues with the request
* that was sent, such as invalid or unknown inputs. It is highly recommended
* that you check this array for issues when integrating the web service.
* @var array This array contains \MaxMind\MinFraud\Model\Warning objects
* detailing issues with the request that was sent, such as
* invalid or unknown inputs. It is highly recommended that you
* check this array for issues when integrating the web service.
*/
public readonly array $warnings;

Expand Down
2 changes: 1 addition & 1 deletion src/MinFraud/ReportTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(
/**
* @param array $values the transaction parameters
*
* @throws \MaxMind\Exception\InvalidInputException when the request has missing or invalid
* @throws InvalidInputException when the request has missing or invalid
* data
* @throws \MaxMind\Exception\AuthenticationException when there is an issue authenticating the
* request
Expand Down
Loading

0 comments on commit d3ee5bb

Please sign in to comment.