Change DEBUG to a static const
This commit is contained in:
@@ -277,7 +277,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
*/
|
||||
private function emsi_parsedat(string $str): int
|
||||
{
|
||||
if ($this->DEBUG)
|
||||
if (static::DEBUG)
|
||||
Log::debug(sprintf('%s:+ emsi_parsedat',self::LOGKEY));
|
||||
|
||||
$l = 0;
|
||||
@@ -826,7 +826,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
*/
|
||||
protected function protocol_init(): int
|
||||
{
|
||||
if ($this->DEBUG)
|
||||
if (static::DEBUG)
|
||||
Log::debug(sprintf('%s:+ Starting EMSI Protocol INIT',self::LOGKEY));
|
||||
|
||||
$got = 0;
|
||||
@@ -852,7 +852,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
$t2 = $this->client->timer_set(self::EMSI_RESEND_TO);
|
||||
while (TRUE) {
|
||||
$ch = $this->client->read_ch(max( 1,min($this->client->timer_rest($t1),$this->client->timer_rest($t2))));
|
||||
if ($this->DEBUG)
|
||||
if (static::DEBUG)
|
||||
Log::debug(sprintf('%s:- Got [%x] (%c)',self::LOGKEY,$ch,$ch));
|
||||
|
||||
if (($ch != self::TIMEOUT) && ($ch < 0))
|
||||
@@ -918,7 +918,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
|
||||
while (! $this->client->timer_expired($t1)) {
|
||||
$ch = $this->client->read_ch(max( 1,min($this->client->timer_rest($t1),$this->client->timer_rest($t2))));
|
||||
if ($this->DEBUG)
|
||||
if (static::DEBUG)
|
||||
Log::debug(sprintf('%s:- Got [%x] (%c)',self::LOGKEY,$ch,$ch));
|
||||
|
||||
if (($ch != self::TIMEOUT) && ($ch < 0))
|
||||
|
Reference in New Issue
Block a user