• 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/ProjectKeyAndNameValidation.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 ProjectKeyAndNameValidation
10
{
11
    /**
12
     * Validates a project key by confirming the key is a valid string and not in use
13
     * 
14
     * **"Permissions" required:** None.
15
     * 
16
     * @param string $key The project key.
17
     */
18
    public function validateProjectKey(
×
19
        ?string $key = null,
20
    ): Schema\ErrorCollection {
21
        return $this->call(
×
22
            uri: '/rest/api/3/projectvalidate/key',
×
23
            method: 'get',
×
24
            query: compact('key'),
×
25
            success: 200,
×
26
            schema: Schema\ErrorCollection::class,
×
27
        );
×
28
    }
29

30
    /**
31
     * Validates a project key and, if the key is invalid or in use, generates a valid random string for the project key
32
     * 
33
     * **"Permissions" required:** None.
34
     * 
35
     * @param string $key The project key.
36
     */
37
    public function getValidProjectKey(
×
38
        ?string $key = null,
39
    ): true {
40
        return $this->call(
×
41
            uri: '/rest/api/3/projectvalidate/validProjectKey',
×
42
            method: 'get',
×
43
            query: compact('key'),
×
44
            success: 200,
×
45
            schema: true,
×
46
        );
×
47
    }
48

49
    /**
50
     * Checks that a project name isn't in use.
51
     * If the name isn't in use, the passed string is returned.
52
     * If the name is in use, this operation attempts to generate a valid project name based on the one supplied, usually by adding a sequence number.
53
     * If a valid project name cannot be generated, a 404 response is returned
54
     * 
55
     * **"Permissions" required:** None.
56
     * 
57
     * @param string $name The project name.
58
     */
59
    public function getValidProjectName(
×
60
        string $name,
61
    ): true {
62
        return $this->call(
×
63
            uri: '/rest/api/3/projectvalidate/validProjectName',
×
64
            method: 'get',
×
65
            query: compact('name'),
×
66
            success: 200,
×
67
            schema: true,
×
68
        );
×
69
    }
70
}
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