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

tylernathanreed / jira-client-php / 13634221961

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

push

github

web-flow
~ Try coveralls action

140 of 6773 relevant lines covered (2.07%)

0.06 hits per line

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

0.0
/src/Operations/ProjectTypes.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 ProjectTypes
10
{
11
    /**
12
     * Returns all "project types", whether or not the instance has a valid license for each type
13
     * 
14
     * This operation can be accessed anonymously
15
     * 
16
     * **"Permissions" required:** None.
17
     * 
18
     * @link https://confluence.atlassian.com/x/Var1Nw
19
     */
20
    public function getAllProjectTypes(): true
×
21
    {
22
        return $this->call(
×
23
            uri: '/rest/api/3/project/type',
×
24
            method: 'get',
×
25
            success: 200,
×
26
            schema: true,
×
27
        );
×
28
    }
29

30
    /**
31
     * Returns all "project types" with a valid license.
32
     * 
33
     * @link https://confluence.atlassian.com/x/Var1Nw
34
     */
35
    public function getAllAccessibleProjectTypes(): true
×
36
    {
37
        return $this->call(
×
38
            uri: '/rest/api/3/project/type/accessible',
×
39
            method: 'get',
×
40
            success: 200,
×
41
            schema: true,
×
42
        );
×
43
    }
44

45
    /**
46
     * Returns a "project type"
47
     * 
48
     * This operation can be accessed anonymously
49
     * 
50
     * **"Permissions" required:** None.
51
     * 
52
     * @link https://confluence.atlassian.com/x/Var1Nw
53
     * 
54
     * @param 'software'|'service_desk'|'business'|'product_discovery' $projectTypeKey
55
     *        The key of the project type.
56
     */
57
    public function getProjectTypeByKey(
×
58
        string $projectTypeKey,
59
    ): Schema\ProjectType {
60
        return $this->call(
×
61
            uri: '/rest/api/3/project/type/{projectTypeKey}',
×
62
            method: 'get',
×
63
            path: compact('projectTypeKey'),
×
64
            success: 200,
×
65
            schema: Schema\ProjectType::class,
×
66
        );
×
67
    }
68

69
    /**
70
     * Returns a "project type" if it is accessible to the user
71
     * 
72
     * **"Permissions" required:** Permission to access Jira.
73
     * 
74
     * @link https://confluence.atlassian.com/x/Var1Nw
75
     * 
76
     * @param 'software'|'service_desk'|'business'|'product_discovery' $projectTypeKey
77
     *        The key of the project type.
78
     */
79
    public function getAccessibleProjectTypeByKey(
×
80
        string $projectTypeKey,
81
    ): Schema\ProjectType {
82
        return $this->call(
×
83
            uri: '/rest/api/3/project/type/{projectTypeKey}/accessible',
×
84
            method: 'get',
×
85
            path: compact('projectTypeKey'),
×
86
            success: 200,
×
87
            schema: Schema\ProjectType::class,
×
88
        );
×
89
    }
90
}
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