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

tylernathanreed / jira-client-php / 13678007438

05 Mar 2025 02:15PM UTC coverage: 2.081% (+0.01%) from 2.067%
13678007438

push

github

tylernathanreed
Merge branch 'master' of github.com:tylernathanreed/jira-client-php

141 of 6775 relevant lines covered (2.08%)

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
     * @return list<Schema\ProjectCategory>
17
     */
18
    public function getAllProjectCategories(): array
×
19
    {
20
        return $this->call(
×
21
            uri: '/rest/api/3/projectCategory',
×
22
            method: 'get',
×
23
            success: 200,
×
24
            schema: [Schema\ProjectCategory::class],
×
25
        );
×
26
    }
27

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

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

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

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