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

podio-community / podio-php / 5937884423

22 Aug 2023 11:00AM UTC coverage: 55.065% (+1.6%) from 53.497%
5937884423

push

github

web-flow
Merge pull request #242 from podio-community/more-fixes

181 of 181 new or added lines in 43 files covered. (100.0%)

1147 of 2083 relevant lines covered (55.06%)

34.62 hits per line

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

0.0
/models/PodioTaskLabel.php
1
<?php
2
/**
3
 * @see https://developers.podio.com/doc/tasks
4
 */
5
class PodioTaskLabel extends PodioObject
6
{
7
    public const DEFAULT_COLOR = 'E9E9E9';
8

9
    public function __construct($attributes = array())
10
    {
11
        parent::__construct();
×
12
        $this->property('label_id', 'integer', array('id' => true));
×
13
        $this->property('text', 'string');
×
14
        $this->property('color', 'string');
×
15

16
        $this->init($attributes);
×
17
    }
18

19
    /**
20
     * @see https://developers.podio.com/doc/tasks/create-label-151265
21
     */
22
    public static function create(PodioClient $podio_client, $attributes = array())
23
    {
24
        if (!isset($attributes['color'])) {
×
25
            $attributes['color'] = PodioTaskLabel::DEFAULT_COLOR;
×
26
        }
27
        $body = $podio_client->post("/task/label/", $attributes)->json_body();
×
28
        return $body['label_id'];
×
29
    }
30

31
    /**
32
     * @see https://developers.podio.com/doc/tasks/get-labels-151534
33
     */
34
    public static function get_all(PodioClient $podio_client)
35
    {
36
        return self::listing($podio_client->get("/task/label"));
×
37
    }
38

39
    /**
40
     * @see https://developers.podio.com/doc/tasks/delete-label-151302
41
     */
42
    public static function delete(PodioClient $podio_client, $label_id)
43
    {
44
        return $podio_client->delete("/task/label/{$label_id}");
×
45
    }
46

47
    /**
48
     * @see https://developers.podio.com/doc/tasks/update-task-labels-151769
49
     */
50
    public static function update(PodioClient $podio_client, $label_id, $attributes = array())
51
    {
52
        return $podio_client->put("/task/label/{$label_id}", $attributes);
×
53
    }
54
}
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