13
13
class CustomProperties extends AbstractApi
14
14
{
15
15
/**
16
- * @param string $owner The account owner of the repository.
16
+ * @param string $owner The account owner of the repository.
17
17
* @param string $repository The name of the repository.
18
18
* @return array|string
19
19
*/
20
20
public function all (string $ owner , string $ repository )
21
21
{
22
- return $ this ->get ('/repos/ ' . rawurlencode ($ owner ) . '/ ' . rawurlencode ($ repository ) . '/properties/values ' );
22
+ return $ this ->get ('/repos/ ' . rawurlencode ($ owner ). '/ ' . rawurlencode ($ repository ). '/properties/values ' );
23
23
}
24
24
25
25
/**
26
- * @param string $owner The account owner of the repository.
27
- * @param string $repository The name of the repository.
26
+ * @param string $owner The account owner of the repository.
27
+ * @param string $repository The name of the repository.
28
28
* @param string $propertyName The name of the property to retrieve.
29
- * @return array
29
+ *
30
30
* @throws RuntimeException if the property is not found.
31
+ *
32
+ * @return array
31
33
*/
32
34
public function show (string $ owner , string $ repository , string $ propertyName ): array
33
35
{
34
36
$ allProperties = $ this ->all ($ owner , $ repository );
35
37
36
- if (!is_array ($ allProperties )) {
38
+ if (!is_array ($ allProperties )) {
37
39
throw new RuntimeException ('Unexpected response from GitHub API. ' );
38
40
}
39
41
@@ -47,13 +49,13 @@ public function show(string $owner, string $repository, string $propertyName): a
47
49
}
48
50
49
51
/**
50
- * @param string $owner The account owner of the repository.
51
- * @param string $repository The name of the repository.
52
+ * @param string $owner The account owner of the repository.
53
+ * @param string $repository The name of the repository.
52
54
* @param array<string, mixed> $params
53
55
* @return array|string
54
56
*/
55
57
public function update (string $ owner , string $ repository , array $ params )
56
58
{
57
- return $ this ->patch ('/repos/ ' . rawurlencode ($ owner ) . '/ ' . rawurlencode ($ repository ) . '/properties/values ' , $ params );
59
+ return $ this ->patch ('/repos/ ' . rawurlencode ($ owner ). '/ ' . rawurlencode ($ repository ). '/properties/values ' , $ params );
58
60
}
59
61
}
0 commit comments