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

tylernathanreed / jira-client-php / 13857440588

14 Mar 2025 01:18PM UTC coverage: 70.825% (-0.06%) from 70.885%
13857440588

push

github

tylernathanreed
~ Fixed nested objects in test examples

9 of 9 new or added lines in 1 file covered. (100.0%)

524 existing lines in 407 files now uncovered.

4826 of 6814 relevant lines covered (70.82%)

8.59 hits per line

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

64.71
/src/Operations/ScreenTabs.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 ScreenTabs
10
{
11
    /**
12
     * Returns the list of tabs for a bulk of screens
13
     * 
14
     * **"Permissions" required:**
15
     * 
16
     *  - *Administer Jira* "global permission".
17
     * 
18
     * @link https://confluence.atlassian.com/x/x4dKLg
19
     * 
20
     * @param ?list<int> $screenId The list of screen IDs.
21
     *                             To include multiple screen IDs, provide an ampersand-separated list.
22
     *                             For example, `screenId=10000&screenId=10001`.
23
     * @param ?list<int> $tabId The list of tab IDs.
24
     *                          To include multiple tab IDs, provide an ampersand-separated list.
25
     *                          For example, `tabId=10000&tabId=10001`.
26
     * @param int $startAt The index of the first item to return in a page of results (page offset).
27
     * @param int $maxResult The maximum number of items to return per page.
28
     *                       The maximum number is 100,
29
     */
30
    public function getBulkScreenTabs(
1✔
31
        ?array $screenId = null,
32
        ?array $tabId = null,
33
        ?int $startAt = 0,
34
        ?int $maxResult = 100,
35
    ): true {
36
        return $this->call(
1✔
37
            uri: '/rest/api/3/screens/tabs',
1✔
38
            method: 'get',
1✔
39
            query: compact('screenId', 'tabId', 'startAt', 'maxResult'),
1✔
40
            success: 200,
1✔
41
            schema: true,
1✔
42
        );
1✔
43
    }
44

45
    /**
46
     * Returns the list of tabs for a screen
47
     * 
48
     * **"Permissions" required:**
49
     * 
50
     *  - *Administer Jira* "global permission"
51
     *  - *Administer projects* "project permission" when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme.
52
     * 
53
     * @link https://confluence.atlassian.com/x/x4dKLg
54
     * @link https://confluence.atlassian.com/x/yodKLg
55
     * 
56
     * @param int $screenId The ID of the screen.
57
     * @param string $projectKey The key of the project.
58
     * 
59
     * @return list<Schema\ScreenableTab>
60
     */
UNCOV
61
    public function getAllScreenTabs(
×
62
        int $screenId,
63
        ?string $projectKey = null,
64
    ): array {
65
        return $this->call(
×
66
            uri: '/rest/api/3/screens/{screenId}/tabs',
×
67
            method: 'get',
×
68
            query: compact('projectKey'),
×
69
            path: compact('screenId'),
×
70
            success: 200,
×
71
            schema: [Schema\ScreenableTab::class],
×
72
        );
×
73
    }
74

75
    /**
76
     * Creates a tab for a screen
77
     * 
78
     * **"Permissions" required:** *Administer Jira* "global permission".
79
     * 
80
     * @link https://confluence.atlassian.com/x/x4dKLg
81
     * 
82
     * @param int $screenId The ID of the screen.
83
     */
84
    public function addScreenTab(
1✔
85
        Schema\ScreenableTab $request,
86
        int $screenId,
87
    ): Schema\ScreenableTab {
88
        return $this->call(
1✔
89
            uri: '/rest/api/3/screens/{screenId}/tabs',
1✔
90
            method: 'post',
1✔
91
            body: $request,
1✔
92
            path: compact('screenId'),
1✔
93
            success: 200,
1✔
94
            schema: Schema\ScreenableTab::class,
1✔
95
        );
1✔
96
    }
97

98
    /**
99
     * Updates the name of a screen tab
100
     * 
101
     * **"Permissions" required:** *Administer Jira* "global permission".
102
     * 
103
     * @link https://confluence.atlassian.com/x/x4dKLg
104
     * 
105
     * @param int $screenId The ID of the screen.
106
     * @param int $tabId The ID of the screen tab.
107
     */
UNCOV
108
    public function renameScreenTab(
×
109
        Schema\ScreenableTab $request,
110
        int $screenId,
111
        int $tabId,
112
    ): Schema\ScreenableTab {
113
        return $this->call(
×
114
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}',
×
115
            method: 'put',
×
116
            body: $request,
×
117
            path: compact('screenId', 'tabId'),
×
118
            success: 200,
×
119
            schema: Schema\ScreenableTab::class,
×
120
        );
×
121
    }
122

123
    /**
124
     * Deletes a screen tab
125
     * 
126
     * **"Permissions" required:** *Administer Jira* "global permission".
127
     * 
128
     * @link https://confluence.atlassian.com/x/x4dKLg
129
     * 
130
     * @param int $screenId The ID of the screen.
131
     * @param int $tabId The ID of the screen tab.
132
     */
133
    public function deleteScreenTab(
1✔
134
        int $screenId,
135
        int $tabId,
136
    ): true {
137
        return $this->call(
1✔
138
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}',
1✔
139
            method: 'delete',
1✔
140
            path: compact('screenId', 'tabId'),
1✔
141
            success: 204,
1✔
142
            schema: true,
1✔
143
        );
1✔
144
    }
145

146
    /**
147
     * Moves a screen tab
148
     * 
149
     * **"Permissions" required:** *Administer Jira* "global permission".
150
     * 
151
     * @link https://confluence.atlassian.com/x/x4dKLg
152
     * 
153
     * @param int $screenId The ID of the screen.
154
     * @param int $tabId The ID of the screen tab.
155
     * @param int $pos The position of tab.
156
     *                 The base index is 0.
157
     */
158
    public function moveScreenTab(
1✔
159
        int $screenId,
160
        int $tabId,
161
        int $pos,
162
    ): true {
163
        return $this->call(
1✔
164
            uri: '/rest/api/3/screens/{screenId}/tabs/{tabId}/move/{pos}',
1✔
165
            method: 'post',
1✔
166
            path: compact('screenId', 'tabId', 'pos'),
1✔
167
            success: 204,
1✔
168
            schema: true,
1✔
169
        );
1✔
170
    }
171
}
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