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

tylernathanreed / jira-client-php / 13954592091

19 Mar 2025 06:57PM UTC coverage: 72.323%. First build
13954592091

push

github

tylernathanreed
+ Added unique exceptions

0 of 10 new or added lines in 5 files covered. (0.0%)

4965 of 6865 relevant lines covered (72.32%)

9.17 hits per line

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

60.0
/src/Configuration.php
1
<?php
2

3
namespace Jira\Client;
4

5
use Jira\Client\Exceptions\InvalidConfigurationException;
6

7
class Configuration
8
{
9
    public function __construct(
477✔
10
        public string $host = 'https://your-domain.atlassian.net',
11

12
        /** The access token for OAuth/Bearer authentication. */
13
        public ?string $accessToken = null,
14

15
        /** The username for HTTP basic authentication. */
16
        public ?string $username = null,
17

18
        /** The password for HTTP basic authentication. */
19
        public ?string $password = null,
20

21
        /** The user agent of the HTTP request. */
22
        public ?string $userAgent = null,
23

24
        /**
25
         * The debug switch or the debug file location.
26
         *
27
         * @var bool|resource
28
         *
29
         * @link https://docs.guzzlephp.org/en/stable/request-options.html#debug
30
         */
31
        public mixed $debug = false,
32
    ) {
33
        $this->validate();
477✔
34
    }
35

36
    protected function validate(): void
477✔
37
    {
38
        if (! empty($this->accessToken)) {
477✔
39
            return;
×
40
        }
41

42
        if (! empty($this->username) && ! empty($this->password)) {
477✔
43
            return;
477✔
44
        }
45

NEW
46
        throw new InvalidConfigurationException(sprintf(
×
47
            'Token Auth ([accessToken]) or Basic Auth ([username] and [password]) must be provided.'
×
48
        ));
×
49
    }
50
}
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