src/Utils/Parser.php
Method detectPacket
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
private static function detectPacket($type)
{
switch ($type) {
case ControlPacketType::CONNECT:
return new Connect();
- Create a ticketCreate a ticket
Method getCmd
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
public static function getCmd($type)
{
switch ($type) {
case ControlPacketType::CONNECT:
return 'connect';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new Unsubscribe();
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'pingreq';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new PingRequest();
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'pubrec';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'pubrel';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new PublishComplete();
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new PublishRelease();
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new UnsubscribeAck();
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new Disconnect();
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new PublishReceived();
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'unsuback';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'disconnect';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'pubcomp';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'pingresp';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new SubscribeAck();
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'suback';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'subscribe';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'unsubscribe';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return 'unknown';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new PingResponse();
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return null;
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Invalid
Invalid
return new Subscribe();
- Create a ticketCreate a ticket