File tree Expand file tree Collapse file tree 3 files changed +33
-9
lines changed Expand file tree Collapse file tree 3 files changed +33
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Example \Client \Resource ;
4
4
5
+ use WyriHaximus \ApiClient \Annotations \Nested ;
5
6
use WyriHaximus \ApiClient \Resource \TransportAwareTrait ;
6
7
8
+ /**
9
+ * @Nested(build="Project\Build", config="Project\Config")
10
+ */
7
11
abstract class Project implements ProjectInterface
8
12
{
9
13
use TransportAwareTrait;
@@ -24,9 +28,14 @@ abstract class Project implements ProjectInterface
24
28
protected $ description ;
25
29
26
30
/**
27
- * @var array
31
+ * @var Project\Build
28
32
*/
29
- protected $ config = array ();
33
+ protected $ build ;
34
+
35
+ /**
36
+ * @var Project\Config
37
+ */
38
+ protected $ config ;
30
39
31
40
/**
32
41
* @var SplObjectStorage
@@ -68,9 +77,17 @@ public function description() : string
68
77
}
69
78
70
79
/**
71
- * @return array
80
+ * @return Project\Build
81
+ */
82
+ public function build () : Project \Build
83
+ {
84
+ return $ this ->build ;
85
+ }
86
+
87
+ /**
88
+ * @return Project\Config
72
89
*/
73
- public function config () : array
90
+ public function config () : Project \ Config
74
91
{
75
92
return $ this ->config ;
76
93
}
Original file line number Diff line number Diff line change @@ -22,9 +22,14 @@ public function name() : string;
22
22
public function description () : string ;
23
23
24
24
/**
25
- * @return array
25
+ * @return Project\Build
26
26
*/
27
- public function config () : array ;
27
+ public function build () : Project \Build ;
28
+
29
+ /**
30
+ * @return Project\Config
31
+ */
32
+ public function config () : Project \Config ;
28
33
29
34
/**
30
35
* @return SplObjectStorage
Original file line number Diff line number Diff line change 1
1
namespace : Example\Client\Resource
2
2
class : Project
3
+ nested :
4
+ build : Project\Build
5
+ config : Project\Config
3
6
properties :
4
7
id : int
5
8
name : string
6
9
description : string
7
- config :
8
- type : array
9
- default : []
10
+ build : Project\Build
11
+ config : Project\Config
10
12
plugins : SplObjectStorage
11
13
created : DateTimeInterface
12
14
updated : DateTimeInterface
You can’t perform that action at this time.
0 commit comments