Skip to content

Commit

Permalink
Merge pull request #6 from slepic/gateways
Browse files Browse the repository at this point in the history
fix stubs for some gateways
  • Loading branch information
exussum12 authored Jan 7, 2025
2 parents da7af85 + 792de70 commit 9f0a26b
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/Braintree/ClientTokenGateway.stub
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ class ClientTokenGateway
{
}

/**
* @param array $params
* @return string
*/
public function generate($params = [])
{
}

/**
* @ignore
* @param var $subPath
Expand Down
2 changes: 1 addition & 1 deletion lib/Braintree/DisputeGateway.stub
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class DisputeGateway
/**
* @param string $id
* @throws NotFound
* @return Successful|Result\Error
* @return Dispute
*/
public function find($id)
{
Expand Down
34 changes: 34 additions & 0 deletions lib/Braintree/MultipleValueNode.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Braintree;

class MultipleValueNode
{
public string $name;
public array $items;
public array $allowedValues;

/**
* @param array $values
* @throws InvalidArgumentException
* @return static
*/
public function in($values)
{
}

/**
* @param mixed $value
* @return static
*/
public function is($value)
{
}

/**
* @return array
*/
public function toParam()
{
}
}
25 changes: 25 additions & 0 deletions lib/Braintree/WebhookTestingGateway.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Braintree;

/**
* WebhookTestingGateway module
* Creates and manages test webhooks
*/
class WebhookTestingGateway
{
public function __construct(Gateway $gateway)
{
}

/**
* @param string $kind
* @param string $id
* @param string $sourceMerchantId
*
* @return array{bt_signature:string,bt_payload:string}
*/
public function sampleNotification($kind, $id, $sourceMerchantId = null)
{
}
}
2 changes: 2 additions & 0 deletions rules.neon
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ parameters:
- lib/Braintree/LocalPaymentFunded.stub
- lib/Braintree/LocalPaymentReversed.stub
- lib/Braintree/MerchantAccount.stub
- lib/Braintree/MultipleValueNode.stub
- lib/Braintree/PayPalAccount.stub
- lib/Braintree/PayPalAccountGateway.stub
- lib/Braintree/PaymentMethodGateway.stub
Expand Down Expand Up @@ -94,6 +95,7 @@ parameters:
- lib/Braintree/VenmoAccount.stub
- lib/Braintree/Version.stub
- lib/Braintree/VisaCheckoutCard.stub
- lib/Braintree/WebhookTestingGateway.stub
- lib/Braintree/Xml.stub
- lib/Braintree/Xml/Generator.stub
- lib/Braintree/Xml/Parser.stub

0 comments on commit 9f0a26b

Please sign in to comment.