Function call
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
public function call($server, $cmd, $data, $getRecv = true)
{
$data = \Group\Async\DataPack::pack($cmd, $data);
static $client = null;
Method call
has 26 lines of code (exceeds 25 allowed). Consider refactoring.
public function call($server, $cmd, $data, $getRecv = true)
{
$data = \Group\Async\DataPack::pack($cmd, $data);
static $client = null;
The method call has a boolean flag argument $getRecv, which is a certain sign of a Single Responsibility Principle violation.
public function call($server, $cmd, $data, $getRecv = true)
Expected 0 spaces before opening brace; 1 found
{
Inline control structures are not allowed
if (!isset($servers[$server])) throw new Exception("Not Found the {$server}", 1);
Expected 1 space after closing parenthesis; found 0
if ($getRecv){
Expected 1 space after closing parenthesis; found 0
if (stristr($content, $package_eof)){
Expected 1 space after closing parenthesis; found 0
if (is_null($client)){
Expected 1 space after closing parenthesis; found 0
if (!$client){
Whitespace found at end of line
{
Whitespace found at end of line
class Client
The variable $package_eof is not named in camelCase.
public function call($server, $cmd, $data, $getRecv = true)
{
$data = \Group\Async\DataPack::pack($cmd, $data);
static $client = null;
The variable $package_eof is not named in camelCase.
public function call($server, $cmd, $data, $getRecv = true)
{
$data = \Group\Async\DataPack::pack($cmd, $data);
static $client = null;
The variable $package_eof is not named in camelCase.
public function call($server, $cmd, $data, $getRecv = true)
{
$data = \Group\Async\DataPack::pack($cmd, $data);
static $client = null;
The variable $package_eof is not named in camelCase.
public function call($server, $cmd, $data, $getRecv = true)
{
$data = \Group\Async\DataPack::pack($cmd, $data);
static $client = null;
There are no issues that match your filters.