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

tylernathanreed / jira-client-php / 13634794100

03 Mar 2025 03:19PM UTC coverage: 2.067% (-0.1%) from 2.21%
13634794100

push

github

web-flow
~ Try coveralls action

140 of 6773 relevant lines covered (2.07%)

0.03 hits per line

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

0.0
/src/Operations/ProjectCategories.php
1
<?php
2

3
namespace Jira\Client\Operations;
4

5
use Jira\Client\Client;
6
use Jira\Client\Schema;
7

8
/** @phpstan-require-extends Client */
9
trait ProjectCategories
10
{
11
    /**
12
     * Returns all project categories
13
     * 
14
     * **"Permissions" required:** Permission to access Jira.
15
     */
16
    public function getAllProjectCategories(): true
×
17
    {
18
        return $this->call(
×
19
            uri: '/rest/api/3/projectCategory',
×
20
            method: 'get',
×
21
            success: 200,
×
22
            schema: true,
×
23
        );
×
24
    }
25

26
    /**
27
     * Creates a project category
28
     * 
29
     * **"Permissions" required:** *Administer Jira* "global permission".
30
     * 
31
     * @link https://confluence.atlassian.com/x/x4dKLg
32
     */
33
    public function createProjectCategory(
×
34
        Schema\ProjectCategory $request,
35
    ): Schema\ProjectCategory {
36
        return $this->call(
×
37
            uri: '/rest/api/3/projectCategory',
×
38
            method: 'post',
×
39
            body: $request,
×
40
            success: 201,
×
41
            schema: Schema\ProjectCategory::class,
×
42
        );
×
43
    }
44

45
    /**
46
     * Returns a project category
47
     * 
48
     * **"Permissions" required:** Permission to access Jira.
49
     * 
50
     * @param int $id The ID of the project category.
51
     */
52
    public function getProjectCategoryById(
×
53
        int $id,
54
    ): Schema\ProjectCategory {
55
        return $this->call(
×
56
            uri: '/rest/api/3/projectCategory/{id}',
×
57
            method: 'get',
×
58
            path: compact('id'),
×
59
            success: 200,
×
60
            schema: Schema\ProjectCategory::class,
×
61
        );
×
62
    }
63

64
    /**
65
     * Updates a project category
66
     * 
67
     * **"Permissions" required:** *Administer Jira* "global permission".
68
     * 
69
     * @link https://confluence.atlassian.com/x/x4dKLg
70
     * 
71
     * @param int $id 
72
     */
73
    public function updateProjectCategory(
×
74
        Schema\ProjectCategory $request,
75
        int $id,
76
    ): Schema\UpdatedProjectCategory {
77
        return $this->call(
×
78
            uri: '/rest/api/3/projectCategory/{id}',
×
79
            method: 'put',
×
80
            body: $request,
×
81
            path: compact('id'),
×
82
            success: 200,
×
83
            schema: Schema\UpdatedProjectCategory::class,
×
84
        );
×
85
    }
86

87
    /**
88
     * Deletes a project category
89
     * 
90
     * **"Permissions" required:** *Administer Jira* "global permission".
91
     * 
92
     * @link https://confluence.atlassian.com/x/x4dKLg
93
     * 
94
     * @param int $id ID of the project category to delete.
95
     */
96
    public function removeProjectCategory(
×
97
        int $id,
98
    ): true {
99
        return $this->call(
×
100
            uri: '/rest/api/3/projectCategory/{id}',
×
101
            method: 'delete',
×
102
            path: compact('id'),
×
103
            success: 204,
×
104
            schema: true,
×
105
        );
×
106
    }
107
}
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