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

podio-community / podio-php / 5730982429

pending completion
5730982429

push

github

web-flow
Merge pull request #233 from podio-community/232-improvements-beta

fix: make podio_client first parameter of functions + remove podio_client member from models

235 of 235 new or added lines in 67 files covered. (100.0%)

916 of 2104 relevant lines covered (43.54%)

32.17 hits per line

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

33.33
/lib/error/PodioError.php
1
<?php
2

3
class PodioError extends Exception
4
{
5
    /** @var array|null */
6
    public $body;
7
    public $status;
8
    public $url;
9
    public $request;
10

11
    /**
12
     * @param string|null $body
13
     * @param int|null $status
14
     * @param string|null $url
15
     */
16
    public function __construct($body, $status, $url)
17
    {
18
        $this->body = $body !== null ? json_decode($body, true) : null;
12✔
19
        $this->status = $status;
12✔
20
        $this->url = $url;
12✔
21
        $this->request = $this->body['request'] ?? null;
12✔
22
        parent::__construct(get_class($this), 1, null);
12✔
23
    }
24

25
    public function __toString()
26
    {
27
        $str = get_class($this);
×
28
        if (!empty($this->body['error_description'])) {
×
29
            $str .= ': "'.$this->body['error_description'].'"';
×
30
        }
31
        $str .= "\nRequest URL: ".$this->request['url'];
×
32
        if (!empty($this->request['query_string'])) {
×
33
            $str .= '?'.$this->request['query_string'];
×
34
        }
35
        if (!empty($this->request['body'])) {
×
36
            $str .= "\nRequest Body: ".json_encode($this->request['body']);
×
37
        }
38

39
        $str .= "\n\nStack Trace: \n".$this->getTraceAsString();
×
40
        return $str;
×
41
    }
42
}
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