Skip to content

Commit d854557

Browse files
committed
Add stubs for tag internal functions
1 parent 0431b6a commit d854557

File tree

5 files changed

+283
-149
lines changed

5 files changed

+283
-149
lines changed

docs/DOCS.txt

+62-86
Original file line numberDiff line numberDiff line change
@@ -2311,6 +2311,68 @@ string git_submodule_url(resource $submodule)
23112311

23122312
?string git_submodule_wd_id(resource $submodule)
23132313

2314+
----------------------------------------
2315+
[git_tag]
2316+
----------------------------------------
2317+
2318+
string git_tag_annotation_create(resource $repo,string $tag_name,resource $target,resource $tagger,string $message)
2319+
2320+
string git_tag_create(resource $repo,string $tag_name,resource $target,resource $tagger,string $message,bool $force)
2321+
2322+
string git_tag_create_frombuffer(resource $repo,string $buffer,bool $force)
2323+
2324+
string git_tag_create_lightweight(resource $repo,string $tag_name,resource $target,bool $buffer)
2325+
2326+
void git_tag_delete(resource $repo,string $tag_name)
2327+
2328+
resource git_tag_dup(resource $tag)
2329+
2330+
Returns git_tag resource
2331+
2332+
void git_tag_foreach(resource $repo,callable $callback,mixed $payload)
2333+
2334+
Callback signature: void callback(string $name,string $oid,mixed $payload)
2335+
2336+
The callback should throw on error.
2337+
2338+
void git_tag_free(resource $tag)
2339+
2340+
string git_tag_id(resource $tag)
2341+
2342+
array git_tag_list(resource $repo)
2343+
2344+
array git_tag_list_match(string $pattern,resource $repo)
2345+
2346+
resource git_tag_lookup(resource $repo,string $id)
2347+
2348+
Returns git_tag resource
2349+
2350+
resource git_tag_lookup_prefix(resource $repo,string $id_prefix)
2351+
2352+
Returns git_tag resource
2353+
2354+
?string git_tag_message(resource $tag)
2355+
2356+
string git_tag_name(resource $tag)
2357+
2358+
resource git_tag_owner(resource $tag)
2359+
2360+
Returns git_repository resource
2361+
2362+
resource git_tag_peel(resource $tag)
2363+
2364+
Returns git_object resource
2365+
2366+
?resource git_tag_tagger(resource $tag)
2367+
2368+
resource git_tag_target(resource $tag)
2369+
2370+
Returns git_object resource
2371+
2372+
string git_tag_target_id(resource $tag)
2373+
2374+
int git_tag_target_type(resource $tag)
2375+
23142376
----------------------------------------
23152377
[git_tree]
23162378
[git_tree_entry]
@@ -2433,92 +2495,6 @@ git_treebuilder_entrycount(resource)
24332495

24342496
Returns int
24352497

2436-
----------------------------------------
2437-
[git_tag]
2438-
----------------------------------------
2439-
2440-
git_tag_annotation_create(resource,string,resource,resource,string)
2441-
2442-
Returns string
2443-
2444-
git_tag_create(resource,string,resource,resource,string,bool)
2445-
2446-
Returns string
2447-
2448-
git_tag_create_frombuffer(resource,string,bool)
2449-
2450-
Returns string
2451-
2452-
git_tag_create_lightweight(resource,string,resource,bool)
2453-
2454-
Returns string
2455-
2456-
git_tag_lookup(resource,string)
2457-
2458-
Returns git_tag resource
2459-
2460-
git_tag_lookup_prefix(resource,string)
2461-
2462-
Returns git_tag resource
2463-
2464-
git_tag_free(resource)
2465-
2466-
git_tag_id(resource)
2467-
2468-
Returns string
2469-
2470-
git_tag_target_id(resource)
2471-
2472-
Returns string
2473-
2474-
git_tag_message(resource)
2475-
2476-
Returns string
2477-
2478-
git_tag_name(resource)
2479-
2480-
Returns string
2481-
2482-
git_tag_owner(resource)
2483-
2484-
Returns git_repository resource
2485-
2486-
git_tag_peel(resource)
2487-
2488-
Returns git_object resource
2489-
2490-
git_tag_target(resource)
2491-
2492-
Returns git_object resource
2493-
2494-
git_tag_tagger(resource)
2495-
2496-
Returns git_signature resource (or null)
2497-
2498-
git_tag_target_type(resource)
2499-
2500-
Returns int
2501-
2502-
git_tag_delete(resource,string)
2503-
2504-
git_tag_dup(resource)
2505-
2506-
Returns git_tag resource
2507-
2508-
git_tag_list(resource)
2509-
2510-
Returns array
2511-
2512-
git_tag_list_match(resource,string)
2513-
2514-
Returns array
2515-
2516-
git_tag_foreach(resource,callable,mixed)
2517-
2518-
Callback signature: void callback(string $name,string $oid,mixed $payload)
2519-
2520-
The callback should throw on error.
2521-
25222498
----------------------------------------
25232499
[git_trace]
25242500
----------------------------------------

stubs/tag.stub.php

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<?php
2+
3+
/**
4+
* @param resource $repo
5+
* @param resource $target
6+
* @param resource $tagger
7+
*/
8+
function git_tag_annotation_create($repo,string $tag_name,$target,$tagger,string $message) : string {}
9+
10+
/**
11+
* @param resource $repo
12+
* @param resource $target
13+
* @param resource $tagger
14+
*/
15+
function git_tag_create($repo,string $tag_name,$target,$tagger,string $message,bool $force) : string {}
16+
17+
/**
18+
* @param resource $repo
19+
*/
20+
function git_tag_create_frombuffer($repo,string $buffer,bool $force) : string {}
21+
22+
/**
23+
* @param resource $repo
24+
* @param resource $target
25+
*/
26+
function git_tag_create_lightweight($repo,string $tag_name,$target,bool $buffer) : string {}
27+
28+
/**
29+
* @param resource $repo
30+
*/
31+
function git_tag_delete($repo,string $tag_name) : void {}
32+
33+
/**
34+
* @param resource $tag
35+
*
36+
* @return resource
37+
*/
38+
function git_tag_dup($tag) {}
39+
40+
/**
41+
* @param resource $repo
42+
*/
43+
function git_tag_foreach($repo,callable $callback,mixed $payload) : void {}
44+
45+
/**
46+
* @param resource $tag
47+
*/
48+
function git_tag_free($tag) : void {}
49+
50+
/**
51+
* @param resource $tag
52+
*/
53+
function git_tag_id($tag) : string {}
54+
55+
/**
56+
* @param resource $repo
57+
*/
58+
function git_tag_list($repo) : array {}
59+
60+
/**
61+
* @param resource $repo
62+
*/
63+
function git_tag_list_match(string $pattern,$repo) : array {}
64+
65+
/**
66+
* @param resource $repo
67+
*
68+
* @return resource
69+
*/
70+
function git_tag_lookup($repo,string $id) {}
71+
72+
/**
73+
* @param resource $repo
74+
*
75+
* @return resource
76+
*/
77+
function git_tag_lookup_prefix($repo,string $id_prefix) {}
78+
79+
/**
80+
* @param resource $tag
81+
*/
82+
function git_tag_message($tag) : ?string {}
83+
84+
/**
85+
* @param resource $tag
86+
*/
87+
function git_tag_name($tag) : string {}
88+
89+
/**
90+
* @param resource $tag
91+
*
92+
* @return resource
93+
*/
94+
function git_tag_owner($tag) {}
95+
96+
/**
97+
* @param resource $tag
98+
*
99+
* @return resource
100+
*/
101+
function git_tag_peel($tag) {}
102+
103+
/**
104+
* @param resource $tag
105+
*
106+
* @return resource
107+
*/
108+
function git_tag_tagger($tag) {}
109+
110+
/**
111+
* @param resource $tag
112+
*
113+
* @return resource
114+
*/
115+
function git_tag_target($tag) {}
116+
117+
/**
118+
* @param resource $tag
119+
*/
120+
function git_tag_target_id($tag) : string {}
121+
122+
/**
123+
* @param resource $tag
124+
*/
125+
function git_tag_target_type($tag) : int {}

stubs/tag_arginfo.h

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/* This is a generated file, edit the .stub.php file instead.
2+
* Stub hash: 82e340efe0d57bda02030c8e074999bbd0b1f50b */
3+
4+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_annotation_create, 0, 5, IS_STRING, 0)
5+
ZEND_ARG_INFO(0, repo)
6+
ZEND_ARG_TYPE_INFO(0, tag_name, IS_STRING, 0)
7+
ZEND_ARG_INFO(0, target)
8+
ZEND_ARG_INFO(0, tagger)
9+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
10+
ZEND_END_ARG_INFO()
11+
12+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_create, 0, 6, IS_STRING, 0)
13+
ZEND_ARG_INFO(0, repo)
14+
ZEND_ARG_TYPE_INFO(0, tag_name, IS_STRING, 0)
15+
ZEND_ARG_INFO(0, target)
16+
ZEND_ARG_INFO(0, tagger)
17+
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
18+
ZEND_ARG_TYPE_INFO(0, force, _IS_BOOL, 0)
19+
ZEND_END_ARG_INFO()
20+
21+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_create_frombuffer, 0, 3, IS_STRING, 0)
22+
ZEND_ARG_INFO(0, repo)
23+
ZEND_ARG_TYPE_INFO(0, buffer, IS_STRING, 0)
24+
ZEND_ARG_TYPE_INFO(0, force, _IS_BOOL, 0)
25+
ZEND_END_ARG_INFO()
26+
27+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_create_lightweight, 0, 4, IS_STRING, 0)
28+
ZEND_ARG_INFO(0, repo)
29+
ZEND_ARG_TYPE_INFO(0, tag_name, IS_STRING, 0)
30+
ZEND_ARG_INFO(0, target)
31+
ZEND_ARG_TYPE_INFO(0, buffer, _IS_BOOL, 0)
32+
ZEND_END_ARG_INFO()
33+
34+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_delete, 0, 2, IS_VOID, 0)
35+
ZEND_ARG_INFO(0, repo)
36+
ZEND_ARG_TYPE_INFO(0, tag_name, IS_STRING, 0)
37+
ZEND_END_ARG_INFO()
38+
39+
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_tag_dup, 0, 0, 1)
40+
ZEND_ARG_INFO(0, tag)
41+
ZEND_END_ARG_INFO()
42+
43+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_foreach, 0, 3, IS_VOID, 0)
44+
ZEND_ARG_INFO(0, repo)
45+
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
46+
ZEND_ARG_TYPE_INFO(0, payload, IS_MIXED, 0)
47+
ZEND_END_ARG_INFO()
48+
49+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_free, 0, 1, IS_VOID, 0)
50+
ZEND_ARG_INFO(0, tag)
51+
ZEND_END_ARG_INFO()
52+
53+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_id, 0, 1, IS_STRING, 0)
54+
ZEND_ARG_INFO(0, tag)
55+
ZEND_END_ARG_INFO()
56+
57+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_list, 0, 1, IS_ARRAY, 0)
58+
ZEND_ARG_INFO(0, repo)
59+
ZEND_END_ARG_INFO()
60+
61+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_list_match, 0, 2, IS_ARRAY, 0)
62+
ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
63+
ZEND_ARG_INFO(0, repo)
64+
ZEND_END_ARG_INFO()
65+
66+
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_tag_lookup, 0, 0, 2)
67+
ZEND_ARG_INFO(0, repo)
68+
ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0)
69+
ZEND_END_ARG_INFO()
70+
71+
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_tag_lookup_prefix, 0, 0, 2)
72+
ZEND_ARG_INFO(0, repo)
73+
ZEND_ARG_TYPE_INFO(0, id_prefix, IS_STRING, 0)
74+
ZEND_END_ARG_INFO()
75+
76+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_message, 0, 1, IS_STRING, 1)
77+
ZEND_ARG_INFO(0, tag)
78+
ZEND_END_ARG_INFO()
79+
80+
#define arginfo_git_tag_name arginfo_git_tag_id
81+
82+
#define arginfo_git_tag_owner arginfo_git_tag_dup
83+
84+
#define arginfo_git_tag_peel arginfo_git_tag_dup
85+
86+
#define arginfo_git_tag_tagger arginfo_git_tag_dup
87+
88+
#define arginfo_git_tag_target arginfo_git_tag_dup
89+
90+
#define arginfo_git_tag_target_id arginfo_git_tag_id
91+
92+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_git_tag_target_type, 0, 1, IS_LONG, 0)
93+
ZEND_ARG_INFO(0, tag)
94+
ZEND_END_ARG_INFO()

0 commit comments

Comments
 (0)