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)
4949
5050 public function sendCount ()
5151 {
52- $ this ->outPorts ()->count ->send ($ this ->count );
53- $ this ->outPorts ()->count ->disconnect ();
52+ $ this ->outPorts ()
53+ ->count
54+ ->send ($ this ->count )
55+ ->disconnect ();
56+
5457 $ this ->count = null ;
5558 }
5659}
Original file line number Diff line number Diff line change @@ -42,11 +42,13 @@ public function __construct()
4242 $ this ->size = 100 ;
4343 $ this ->messages = [];
4444
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 ' ]);
4748
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 ' ]);
5052
5153 $ this ->inPorts ()->in ->on ('data ' , [$ this , 'onAppendQueue ' ]);
5254 $ this ->inPorts ()->in ->on ('detach ' , [$ this , 'onStreamEnded ' ]);
@@ -96,8 +98,10 @@ private function sendQueue()
9698
9799 private function flushQueue ()
98100 {
99- $ this ->outPorts ()->messages ->send ($ this ->messages );
100- $ this ->outPorts ()->messages ->disconnect ();
101+ $ this ->outPorts ()
102+ ->messages
103+ ->send ($ this ->messages )
104+ ->disconnect ();
101105
102106 $ this ->messages = [];
103107 }
Original file line number Diff line number Diff line change @@ -23,8 +23,9 @@ class ReadFile extends Component
2323 public function __construct ()
2424 {
2525 $ 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
2829
2930 $ this ->inPorts ()->source ->on ('data ' , [$ this , 'readFile ' ]);
3031 }
@@ -40,7 +41,9 @@ public function readFile($data)
4041 return ;
4142 }
4243
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 ();
4548 }
4649}
Original file line number Diff line number Diff line change @@ -32,8 +32,9 @@ class SplitStr extends Component
3232
3333 public function __construct ()
3434 {
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 ' ]);
3738 $ this ->outPorts ()->add ('out ' , ['datatype ' => 'string ' ]);
3839
3940 $ this ->inPorts ()->delimiter ->on ('data ' , [$ this , 'setDelimiter ' ]);
You can’t perform that action at this time.
0 commit comments