• 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/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
     * @return list<Schema\ProjectType>
21
     */
22
    public function getAllProjectTypes(): array
×
23
    {
24
        return $this->call(
×
25
            uri: '/rest/api/3/project/type',
×
26
            method: 'get',
×
27
            success: 200,
×
28
            schema: [Schema\ProjectType::class],
×
29
        );
×
30
    }
31

32
    /**
33
     * Returns all "project types" with a valid license.
34
     * 
35
     * @link https://confluence.atlassian.com/x/Var1Nw
36
     * 
37
     * @return list<Schema\ProjectType>
38
     */
39
    public function getAllAccessibleProjectTypes(): array
×
40
    {
41
        return $this->call(
×
42
            uri: '/rest/api/3/project/type/accessible',
×
43
            method: 'get',
×
44
            success: 200,
×
45
            schema: [Schema\ProjectType::class],
×
46
        );
×
47
    }
48

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

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