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

webeweb / core-library / 9081250776

14 May 2024 02:33PM UTC coverage: 99.831% (-0.001%) from 99.832%
9081250776

push

github

webeweb
Improve documentation

87297 of 87445 relevant lines covered (99.83%)

12.57 hits per line

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

60.0
/src/Provider/GuzzleHelper.php
1
<?php
2

3
declare(strict_types = 1);
4

5
/*
6
 * This file is part of the core-library package.
7
 *
8
 * (c) 2021 WEBEWEB
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13

14
namespace WBW\Library\Common\Provider;
15

16
/**
17
 * Guzzle helper.
18
 *
19
 * @author webeweb <https://github.com/webeweb>
20
 * @package WBW\Library\Common\Provider
21
 */
22
class GuzzleHelper {
23

24
    /**
25
     * Get the stream parameter name.
26
     *
27
     * @return string|null Returns the stream parameter name.
28
     */
29
    public static function getStreamParameterName(): ?string {
30

31
        if (false === interface_exists("GuzzleHttp\\ClientInterface")) {
12✔
32
            return null;
×
33
        }
34

35
        // Guzzle v6.x.x
36
        if (true === defined("GuzzleHttp\\ClientInterface::VERSION")) {
12✔
37
            return "save_to";
×
38
        }
39

40
        // Guzzle v7.x.x
41
        return "sink";
12✔
42
    }
43
}
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

© 2025 Coveralls, Inc