Skip to content

Commit

Permalink
backward compatibility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Mips2648 committed May 19, 2022
1 parent 8aa088e commit e4b7276
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/MipsEqLogicTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ public function getCmdInfoValue($logicalId, $default = '') {
return $cmd->execCmd();
}

abstract protected static function getSocketPort();
protected static function getSocketPort() {
return 0;
}

public static function sendToDaemon($params) {
$deamon_info = self::deamon_info();
Expand All @@ -128,7 +130,7 @@ public static function sendToDaemon($params) {
}
$port = self::getSocketPort();
if ($port < 1 || $port > 65535) {
throw new InvalidArgumentException("Please provide a valid port number");
throw new InvalidArgumentException("Please implement static function getSocketPort and return a valid port number");
}

log::add(__CLASS__, 'debug', 'params to send to daemon:' . json_encode($params));
Expand Down

0 comments on commit e4b7276

Please sign in to comment.