for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace leocata\m1Bot;
use leocata\M1\HttpClientAuthorization;
use leocata\m1Bot\Workers\WebSocketWorker;
class Bot
{
public $pass = '';
public $username = '';
private $auth;
public function __construct()
$this->setAuth();
}
public function setAuth()
$this->auth = new HttpClientAuthorization($this->username, $this->pass);
protected function runWebSocketWorker($auth, $events)
$callbackWebSocket = new WebSocketWorker($auth, $events);
return $callbackWebSocket->execute();
$callbackWebSocket->execute()
leocata\m1Bot\Workers\WebSocketWorker::execute()
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.