@@ -61,33 +61,18 @@ public function export(string $className): string
61
61
foreach ($ this ->configuration ->Devices as $ device ) {
62
62
foreach ($ device ->inp as $ tag ) {
63
63
$ io = IO ::fromPictory ($ tag );
64
-
65
- if ($ io ->unit === null ) {
66
- continue ;
67
- }
68
-
69
64
$ class ->addComment (sprintf ('@method InputIO %s() ' , $ io ->name ));
70
65
$ class ->addAttribute (Input::class, $ io ->attributeArgs ());
71
66
}
72
67
73
68
foreach ($ device ->out as $ tag ) {
74
69
$ io = IO ::fromPictory ($ tag );
75
-
76
- if ($ io ->unit === null ) {
77
- continue ;
78
- }
79
-
80
70
$ class ->addComment (sprintf ('@method OutputIO %s() ' , $ io ->name ));
81
71
$ class ->addAttribute (Output::class, $ io ->attributeArgs ());
82
72
}
83
73
84
74
foreach ($ device ->mem as $ tag ) {
85
75
$ io = IO ::fromPictory ($ tag );
86
-
87
- if ($ io ->unit === null ) {
88
- continue ;
89
- }
90
-
91
76
$ class ->addComment (sprintf ('@method MemoryIO %s() ' , $ io ->name ));
92
77
$ class ->addAttribute (Memory::class, $ io ->attributeArgs ());
93
78
}
@@ -96,31 +81,16 @@ public function export(string $className): string
96
81
foreach ($ this ->configuration ->Devices as $ device ) {
97
82
foreach ($ device ->inp as $ tag ) {
98
83
$ io = IO ::fromPictory ($ tag );
99
-
100
- if ($ io ->unit === null ) {
101
- continue ;
102
- }
103
-
104
84
$ class ->addComment (sprintf ('@property-read %s %s %s ' , $ io ->unit , $ io ->name , $ io ->comment ));
105
85
}
106
86
107
87
foreach ($ device ->out as $ tag ) {
108
88
$ io = IO ::fromPictory ($ tag );
109
-
110
- if ($ io ->unit === null ) {
111
- continue ;
112
- }
113
-
114
89
$ class ->addComment (sprintf ('@property %s %s %s ' , $ io ->unit , $ io ->name , $ io ->comment ));
115
90
}
116
91
117
92
foreach ($ device ->mem as $ tag ) {
118
93
$ io = IO ::fromPictory ($ tag );
119
-
120
- if ($ io ->unit === null ) {
121
- continue ;
122
- }
123
-
124
94
$ class ->addComment (sprintf ('@property %s %s %s ' , $ io ->unit , $ io ->name , $ io ->comment ));
125
95
}
126
96
}
0 commit comments