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

stripe / stripe-php / 9308533534

30 May 2024 08:07PM UTC coverage: 65.24% (-0.9%) from 66.176%
9308533534

push

github

web-flow
Added PHPDocs for `create`, `update`, `delete`, `all`, `retrieve` methods after moving them out of traits.  (#1701)

* Demagiced crudl operation

* Improvements from codegen#1452

* Updated override to fix indents

1080 of 1682 new or added lines in 106 files covered. (64.21%)

15 existing lines in 3 files now uncovered.

3444 of 5279 relevant lines covered (65.24%)

2.29 hits per line

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

0.0
/lib/ApiOperations/SingletonRetrieve.php
1
<?php
2

3
namespace Stripe\ApiOperations;
4

5
/**
6
 * Trait for retrievable singleton resources. Adds a `retrieve()` static method to the
7
 * class.
8
 *
9
 * This trait should only be applied to classes that derive from SingletonApiResource.
10
 */
11
trait SingletonRetrieve
12
{
13
    /**
14
     * @param null|array|string $opts the ID of the API resource to retrieve,
15
     *     or an options array containing an `id` key
16
     *
17
     * @throws \Stripe\Exception\ApiErrorException if the request fails
18
     *
19
     * @return static
20
     */
UNCOV
21
    public static function retrieve($opts = null)
×
22
    {
UNCOV
23
        $opts = \Stripe\Util\RequestOptions::parse($opts);
×
UNCOV
24
        $instance = new static(null, $opts);
×
UNCOV
25
        $instance->refresh();
×
26

UNCOV
27
        return $instance;
×
28
    }
29
}
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