@@ -69,53 +69,95 @@ public function getExamples(): array
69
69
{
70
70
/*
71
71
* Test only
72
- array (size=10)
73
- 'years' =>
74
- object(Nejcc\PhpDatatypes\Scalar\Integers\Signed\Int8)[4]
75
- protected readonly int 'value' => int 33
76
- 'account_number' =>
77
- object(Nejcc\PhpDatatypes\Scalar\Integers\Unsigned\UInt32)[5]
78
- protected readonly int 'value' => int 343233
79
- 'account_balance' =>
80
- object(Nejcc\PhpDatatypes\Scalar\FloatingPoints\Float32)[6]
81
- protected readonly float 'value' => float 1234.56
82
- 'investment_amount' =>
83
- object(Nejcc\PhpDatatypes\Scalar\FloatingPoints\Float64)[7]
84
- protected readonly float 'value' => float 78910.12345
85
- 'grade' =>
86
- object(Nejcc\PhpDatatypes\Scalar\Char)[8]
87
- private string 'value' => string 'A' (length=1)
88
- 'age' =>
89
- object(Nejcc\PhpDatatypes\Scalar\Byte)[9]
90
- private int 'value' => int 25
91
- 'names' =>
92
- object(Nejcc\PhpDatatypes\Composite\Arrays\StringArray)[10]
93
- private array 'value' =>
94
- array (size=3)
95
- 0 => string 'John' (length=4)
96
- 1 => string 'Jane' (length=4)
97
- 2 => string 'Doe' (length=3)
98
- 'scores' =>
99
- object(Nejcc\PhpDatatypes\Composite\Arrays\IntArray)[11]
100
- private array 'value' =>
101
- array (size=3)
102
- 0 => int 100
103
- 1 => int 95
104
- 2 => int 87
105
- 'weights' =>
106
- object(Nejcc\PhpDatatypes\Composite\Arrays\FloatArray)[12]
107
- private array 'value' =>
108
- array (size=3)
109
- 0 => float 60.5
110
- 1 => float 72.3
111
- 2 => float 88.9
112
- 'data' =>
113
- object(Nejcc\PhpDatatypes\Composite\Arrays\ByteSlice)[13]
114
- private array 'value' =>
115
- array (size=3)
116
- 0 => int 255
117
- 1 => int 128
118
- 2 => int 0
72
+
73
+ array (size=14)
74
+ 'years' =>
75
+ object(Nejcc\PhpDatatypes\Scalar\Integers\Signed\Int8)[4]
76
+ protected readonly int 'value' => int 33
77
+ 'account_number' =>
78
+ object(Nejcc\PhpDatatypes\Scalar\Integers\Unsigned\UInt32)[5]
79
+ protected readonly int 'value' => int 343233
80
+ 'account_balance' =>
81
+ object(Nejcc\PhpDatatypes\Scalar\FloatingPoints\Float32)[6]
82
+ protected readonly float 'value' => float 1234.56
83
+ 'investment_amount' =>
84
+ object(Nejcc\PhpDatatypes\Scalar\FloatingPoints\Float64)[7]
85
+ protected readonly float 'value' => float 78910.12345
86
+ 'grade' =>
87
+ object(Nejcc\PhpDatatypes\Scalar\Char)[8]
88
+ private string 'value' => string 'A' (length=1)
89
+ 'age' =>
90
+ object(Nejcc\PhpDatatypes\Scalar\Byte)[9]
91
+ private int 'value' => int 25
92
+ 'names' =>
93
+ object(Nejcc\PhpDatatypes\Composite\Arrays\StringArray)[10]
94
+ private array 'value' =>
95
+ array (size=3)
96
+ 0 => string 'John' (length=4)
97
+ 1 => string 'Jane' (length=4)
98
+ 2 => string 'Doe' (length=3)
99
+ 'scores' =>
100
+ object(Nejcc\PhpDatatypes\Composite\Arrays\IntArray)[11]
101
+ private array 'value' =>
102
+ array (size=3)
103
+ 0 => int 100
104
+ 1 => int 95
105
+ 2 => int 87
106
+ 'weights' =>
107
+ object(Nejcc\PhpDatatypes\Composite\Arrays\FloatArray)[12]
108
+ private array 'value' =>
109
+ array (size=3)
110
+ 0 => float 60.5
111
+ 1 => float 72.3
112
+ 2 => float 88.9
113
+ 'data' =>
114
+ object(Nejcc\PhpDatatypes\Composite\Arrays\ByteSlice)[13]
115
+ private array 'value' =>
116
+ array (size=3)
117
+ 0 => int 255
118
+ 1 => int 128
119
+ 2 => int 0
120
+ 'listData' =>
121
+ object(Nejcc\PhpDatatypes\Composite\ListData)[14]
122
+ private array 'elements' =>
123
+ array (size=3)
124
+ 0 => string 'apple' (length=5)
125
+ 1 => string 'banana' (length=6)
126
+ 2 => string 'orange' (length=6)
127
+ 'dictionary' =>
128
+ object(Nejcc\PhpDatatypes\Composite\Dictionary)[15]
129
+ private array 'elements' =>
130
+ array (size=3)
131
+ 'name' => string 'Nejc' (length=4)
132
+ 'age' => int 99
133
+ 'country' => string 'Slovenia' (length=8)
134
+ 'struct' =>
135
+ object(Nejcc\PhpDatatypes\Composite\Struct\Struct)[16]
136
+ private array 'fields' =>
137
+ array (size=3)
138
+ 'name' =>
139
+ array (size=2)
140
+ ...
141
+ 'age' =>
142
+ array (size=2)
143
+ ...
144
+ 'balance' =>
145
+ array (size=2)
146
+ ...
147
+ 'struct_all' =>
148
+ array (size=3)
149
+ 'name' =>
150
+ array (size=2)
151
+ 'type' => string 'string' (length=6)
152
+ 'value' => string 'Nejc' (length=4)
153
+ 'age' =>
154
+ array (size=2)
155
+ 'type' => string 'int' (length=3)
156
+ 'value' => int 30
157
+ 'balance' =>
158
+ array (size=2)
159
+ 'type' => string 'float' (length=5)
160
+ 'value' => float 250.75
119
161
*/
120
162
return [
121
163
'years ' => $ this ->years ,
@@ -131,7 +173,7 @@ public function getExamples(): array
131
173
'listData ' => $ this ->listData ,
132
174
'dictionary ' => $ this ->dictionary ,
133
175
'struct ' => $ this ->struct ,
134
- 'struct_all ' => $ this ->struct ->getFields (),
176
+ 'struct_all ' => $ this ->struct ->getFields (),
135
177
];
136
178
}
137
179
}
0 commit comments