• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-php / 6471862601

10 Oct 2023 04:02PM UTC coverage: 69.665% (-0.5%) from 70.141%
6471862601

push

github

web-flow
Merge pull request #1570 from localheinz/feature/coveralls

Enhancement: Use `coverallsapp/github-action` to report code coverage

2393 of 3435 relevant lines covered (69.67%)

3.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/Exception/InvalidRequestException.php
1
<?php
2

3
namespace Stripe\Exception;
4

5
/**
6
 * InvalidRequestException is thrown when a request is initiated with invalid
7
 * parameters.
8
 */
9
class InvalidRequestException extends ApiErrorException
10
{
11
    protected $stripeParam;
12

13
    /**
14
     * Creates a new InvalidRequestException exception.
15
     *
16
     * @param string $message the exception message
17
     * @param null|int $httpStatus the HTTP status code
18
     * @param null|string $httpBody the HTTP body as a string
19
     * @param null|array $jsonBody the JSON deserialized body
20
     * @param null|array|\Stripe\Util\CaseInsensitiveArray $httpHeaders the HTTP headers array
21
     * @param null|string $stripeCode the Stripe error code
22
     * @param null|string $stripeParam the parameter related to the error
23
     *
24
     * @return InvalidRequestException
25
     */
26
    public static function factory(
×
27
        $message,
28
        $httpStatus = null,
29
        $httpBody = null,
30
        $jsonBody = null,
31
        $httpHeaders = null,
32
        $stripeCode = null,
33
        $stripeParam = null
34
    ) {
35
        $instance = parent::factory($message, $httpStatus, $httpBody, $jsonBody, $httpHeaders, $stripeCode);
×
36
        $instance->setStripeParam($stripeParam);
×
37

38
        return $instance;
×
39
    }
40

41
    /**
42
     * Gets the parameter related to the error.
43
     *
44
     * @return null|string
45
     */
46
    public function getStripeParam()
×
47
    {
48
        return $this->stripeParam;
×
49
    }
50

51
    /**
52
     * Sets the parameter related to the error.
53
     *
54
     * @param null|string $stripeParam
55
     */
56
    public function setStripeParam($stripeParam)
×
57
    {
58
        $this->stripeParam = $stripeParam;
×
59
    }
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc