File tree Expand file tree Collapse file tree 4 files changed +25
-14
lines changed Expand file tree Collapse file tree 4 files changed +25
-14
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,11 @@ public function appendCount($data)
49
49
50
50
public function sendCount ()
51
51
{
52
- $ this ->outPorts ()->count ->send ($ this ->count );
53
- $ this ->outPorts ()->count ->disconnect ();
52
+ $ this ->outPorts ()
53
+ ->count
54
+ ->send ($ this ->count )
55
+ ->disconnect ();
56
+
54
57
$ this ->count = null ;
55
58
}
56
59
}
Original file line number Diff line number Diff line change @@ -42,11 +42,13 @@ public function __construct()
42
42
$ this ->size = 100 ;
43
43
$ this ->messages = [];
44
44
45
- $ this ->inPorts ()->add ('in ' , ['datatype ' => 'all ' ]);
46
- $ this ->inPorts ()->add ('size ' , ['datatype ' => 'all ' ]);
45
+ $ this ->inPorts ()
46
+ ->add ('in ' , ['datatype ' => 'all ' ])
47
+ ->add ('size ' , ['datatype ' => 'all ' ]);
47
48
48
- $ this ->outPorts ()->add ('error ' , ['datatype ' => 'all ' ]);
49
- $ this ->outPorts ()->add ('messages ' , ['datatype ' => 'all ' ]);
49
+ $ this ->outPorts ()
50
+ ->add ('error ' , ['datatype ' => 'all ' ])
51
+ ->add ('messages ' , ['datatype ' => 'all ' ]);
50
52
51
53
$ this ->inPorts ()->in ->on ('data ' , [$ this , 'onAppendQueue ' ]);
52
54
$ this ->inPorts ()->in ->on ('detach ' , [$ this , 'onStreamEnded ' ]);
@@ -96,8 +98,10 @@ private function sendQueue()
96
98
97
99
private function flushQueue ()
98
100
{
99
- $ this ->outPorts ()->messages ->send ($ this ->messages );
100
- $ this ->outPorts ()->messages ->disconnect ();
101
+ $ this ->outPorts ()
102
+ ->messages
103
+ ->send ($ this ->messages )
104
+ ->disconnect ();
101
105
102
106
$ this ->messages = [];
103
107
}
Original file line number Diff line number Diff line change @@ -23,8 +23,9 @@ class ReadFile extends Component
23
23
public function __construct ()
24
24
{
25
25
$ this ->inPorts ()->add ('source ' , ['datatype ' => 'string ' ]);
26
- $ this ->outPorts ()->add ('out ' , ['datatype ' => 'string ' ]);
27
- $ this ->outPorts ()->add ('error ' , []); // use defaults, datatype = all
26
+ $ this ->outPorts ()
27
+ ->add ('out ' , ['datatype ' => 'string ' ])
28
+ ->add ('error ' , []); // use defaults, datatype = all
28
29
29
30
$ this ->inPorts ()->source ->on ('data ' , [$ this , 'readFile ' ]);
30
31
}
@@ -40,7 +41,9 @@ public function readFile($data)
40
41
return ;
41
42
}
42
43
43
- $ this ->outPorts ()->out ->send (file_get_contents ($ data ));
44
- $ this ->outPorts ()->out ->disconnect ();
44
+ $ this ->outPorts ()
45
+ ->out
46
+ ->send (file_get_contents ($ data ))
47
+ ->disconnect ();
45
48
}
46
49
}
Original file line number Diff line number Diff line change @@ -32,8 +32,9 @@ class SplitStr extends Component
32
32
33
33
public function __construct ()
34
34
{
35
- $ this ->inPorts ()->add ('in ' , ['datatype ' => 'string ' ]);
36
- $ this ->inPorts ()->add ('delimiter ' , ['datatype ' => 'string ' ]);
35
+ $ this ->inPorts ()
36
+ ->add ('in ' , ['datatype ' => 'string ' ])
37
+ ->add ('delimiter ' , ['datatype ' => 'string ' ]);
37
38
$ this ->outPorts ()->add ('out ' , ['datatype ' => 'string ' ]);
38
39
39
40
$ this ->inPorts ()->delimiter ->on ('data ' , [$ this , 'setDelimiter ' ]);
You can’t perform that action at this time.
0 commit comments