This repository was archived by the owner on Oct 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
src/main/php/org/nagios/nsca Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,7 @@ Example
1616-------
1717
1818``` php
19- use org\nagios\nsca\NscaClient;
20- use org\nagios\nsca\NscaMessage;
21- use org\nagios\nsca\NscaProtocol;
19+ use org\nagios\nsca\{NscaClient, NscaMessage, NscaProtocol};
2220
2321$c= new NscaClient('nagios.example.com');
2422$c->connect();
Original file line number Diff line number Diff line change 3535 * @see http://nagios.sourceforge.net/download/cvs/nsca-cvs.tar.gz
3636 * @see http://jasonplancaster.com/projects/scripts/send_nsca/send_nsca_pl.source
3737 */
38- class NscaClient {
38+ class NscaClient implements \ lang \Closeable {
3939 public
4040 $ sock = null ,
4141 $ version = 0 ,
@@ -196,10 +196,10 @@ public function toString() {
196196 /**
197197 * Closes the communication socket to the NSCA server
198198 *
199- * @return bool
199+ * @return void
200200 */
201201 public function close () {
202- return $ this ->sock ->isConnected () ? $ this ->sock ->close () : TRUE ;
202+ $ this ->sock ->isConnected () && $ this ->sock ->close ();
203203 }
204204
205205 /**
You can’t perform that action at this time.
0 commit comments