File tree Expand file tree Collapse file tree 9 files changed +460
-0
lines changed Expand file tree Collapse file tree 9 files changed +460
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ namespace ApiClients \Client \Github \Resource \Git ;
4
+
5
+ use ApiClients \Foundation \Hydrator \Annotation \Collection ;
6
+ use ApiClients \Foundation \Hydrator \Annotation \EmptyResource ;
7
+ use ApiClients \Foundation \Resource \AbstractResource ;
8
+
9
+ /**
10
+ * @Collection(
11
+ * tree="Git\NamedBlob"
12
+ * )
13
+ * @EmptyResource("Git\EmptyBlob")
14
+ */
15
+ abstract class Blob extends AbstractResource implements BlobInterface
16
+ {
17
+ /**
18
+ * @var string
19
+ */
20
+ protected $ sha ;
21
+
22
+ /**
23
+ * @var string
24
+ */
25
+ protected $ url ;
26
+
27
+ /**
28
+ * @var array
29
+ */
30
+ protected $ tree ;
31
+
32
+ /**
33
+ * @var bool
34
+ */
35
+ protected $ truncated ;
36
+
37
+ /**
38
+ * @return string
39
+ */
40
+ public function sha (): string
41
+ {
42
+ return $ this ->sha ;
43
+ }
44
+
45
+ /**
46
+ * @return string
47
+ */
48
+ public function url (): string
49
+ {
50
+ return $ this ->url ;
51
+ }
52
+
53
+ /**
54
+ * @return array
55
+ */
56
+ public function tree (): array
57
+ {
58
+ return $ this ->tree ;
59
+ }
60
+
61
+ /**
62
+ * @return bool
63
+ */
64
+ public function truncated (): bool
65
+ {
66
+ return $ this ->truncated ;
67
+ }
68
+ }
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ namespace ApiClients \Client \Github \Resource \Git ;
4
+
5
+ use ApiClients \Foundation \Resource \ResourceInterface ;
6
+
7
+ interface BlobInterface extends ResourceInterface
8
+ {
9
+ const HYDRATE_CLASS = 'Git \\Blob ' ;
10
+
11
+ /**
12
+ * @return string
13
+ */
14
+ public function sha (): string ;
15
+
16
+ /**
17
+ * @return string
18
+ */
19
+ public function url (): string ;
20
+
21
+ /**
22
+ * @return array
23
+ */
24
+ public function tree (): array ;
25
+
26
+ /**
27
+ * @return bool
28
+ */
29
+ public function truncated (): bool ;
30
+ }
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ namespace ApiClients \Client \Github \Resource \Git ;
4
+
5
+ use ApiClients \Foundation \Resource \EmptyResourceInterface ;
6
+
7
+ abstract class EmptyBlob implements BlobInterface, EmptyResourceInterface
8
+ {
9
+ /**
10
+ * @return string
11
+ */
12
+ public function sha (): string
13
+ {
14
+ return null ;
15
+ }
16
+
17
+ /**
18
+ * @return string
19
+ */
20
+ public function url (): string
21
+ {
22
+ return null ;
23
+ }
24
+
25
+ /**
26
+ * @return array
27
+ */
28
+ public function tree (): array
29
+ {
30
+ }
31
+
32
+ /**
33
+ * @return bool
34
+ */
35
+ public function truncated (): bool
36
+ {
37
+ return null ;
38
+ }
39
+ }
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ namespace ApiClients \Client \Github \Resource \Git ;
4
+
5
+ use ApiClients \Foundation \Resource \EmptyResourceInterface ;
6
+
7
+ abstract class EmptyNamedBlog implements NamedBlogInterface, EmptyResourceInterface
8
+ {
9
+ /**
10
+ * @return string
11
+ */
12
+ public function path (): string
13
+ {
14
+ return null ;
15
+ }
16
+
17
+ /**
18
+ * @return string
19
+ */
20
+ public function mode (): string
21
+ {
22
+ return null ;
23
+ }
24
+
25
+ /**
26
+ * @return string
27
+ */
28
+ public function type (): string
29
+ {
30
+ return null ;
31
+ }
32
+
33
+ /**
34
+ * @return int
35
+ */
36
+ public function size (): int
37
+ {
38
+ return null ;
39
+ }
40
+
41
+ /**
42
+ * @return string
43
+ */
44
+ public function sha (): string
45
+ {
46
+ return null ;
47
+ }
48
+
49
+ /**
50
+ * @return string
51
+ */
52
+ public function url (): string
53
+ {
54
+ return null ;
55
+ }
56
+ }
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ namespace ApiClients \Client \Github \Resource \Git ;
4
+
5
+ use ApiClients \Foundation \Resource \EmptyResourceInterface ;
6
+
7
+ abstract class EmptyTree implements TreeInterface, EmptyResourceInterface
8
+ {
9
+ /**
10
+ * @return string
11
+ */
12
+ public function sha (): string
13
+ {
14
+ return null ;
15
+ }
16
+
17
+ /**
18
+ * @return string
19
+ */
20
+ public function url (): string
21
+ {
22
+ return null ;
23
+ }
24
+
25
+ /**
26
+ * @return array
27
+ */
28
+ public function tree (): array
29
+ {
30
+ }
31
+
32
+ /**
33
+ * @return bool
34
+ */
35
+ public function truncated (): bool
36
+ {
37
+ return null ;
38
+ }
39
+ }
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ namespace ApiClients \Client \Github \Resource \Git ;
4
+
5
+ use ApiClients \Foundation \Hydrator \Annotation \EmptyResource ;
6
+ use ApiClients \Foundation \Resource \AbstractResource ;
7
+
8
+ /**
9
+ * @EmptyResource("Git\EmptyNamedBlog")
10
+ */
11
+ abstract class NamedBlog extends AbstractResource implements NamedBlogInterface
12
+ {
13
+ /**
14
+ * @var string
15
+ */
16
+ protected $ path ;
17
+
18
+ /**
19
+ * @var string
20
+ */
21
+ protected $ mode ;
22
+
23
+ /**
24
+ * @var string
25
+ */
26
+ protected $ type ;
27
+
28
+ /**
29
+ * @var int
30
+ */
31
+ protected $ size ;
32
+
33
+ /**
34
+ * @var string
35
+ */
36
+ protected $ sha ;
37
+
38
+ /**
39
+ * @var string
40
+ */
41
+ protected $ url ;
42
+
43
+ /**
44
+ * @return string
45
+ */
46
+ public function path (): string
47
+ {
48
+ return $ this ->path ;
49
+ }
50
+
51
+ /**
52
+ * @return string
53
+ */
54
+ public function mode (): string
55
+ {
56
+ return $ this ->mode ;
57
+ }
58
+
59
+ /**
60
+ * @return string
61
+ */
62
+ public function type (): string
63
+ {
64
+ return $ this ->type ;
65
+ }
66
+
67
+ /**
68
+ * @return int
69
+ */
70
+ public function size (): int
71
+ {
72
+ return $ this ->size ;
73
+ }
74
+
75
+ /**
76
+ * @return string
77
+ */
78
+ public function sha (): string
79
+ {
80
+ return $ this ->sha ;
81
+ }
82
+
83
+ /**
84
+ * @return string
85
+ */
86
+ public function url (): string
87
+ {
88
+ return $ this ->url ;
89
+ }
90
+ }
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ namespace ApiClients \Client \Github \Resource \Git ;
4
+
5
+ use ApiClients \Foundation \Resource \ResourceInterface ;
6
+
7
+ interface NamedBlogInterface extends ResourceInterface
8
+ {
9
+ const HYDRATE_CLASS = 'Git \\NamedBlog ' ;
10
+
11
+ /**
12
+ * @return string
13
+ */
14
+ public function path (): string ;
15
+
16
+ /**
17
+ * @return string
18
+ */
19
+ public function mode (): string ;
20
+
21
+ /**
22
+ * @return string
23
+ */
24
+ public function type (): string ;
25
+
26
+ /**
27
+ * @return int
28
+ */
29
+ public function size (): int ;
30
+
31
+ /**
32
+ * @return string
33
+ */
34
+ public function sha (): string ;
35
+
36
+ /**
37
+ * @return string
38
+ */
39
+ public function url (): string ;
40
+ }
You can’t perform that action at this time.
0 commit comments