Showing 95 of 95 total issues
File MimeType.php
has 1006 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Zeus\ServerService\Http;
class MimeType
File Message.php
has 574 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Zeus\ServerService\Memcache\Message;
use Zend\Cache\Storage\AvailableSpaceCapableInterface;
File Scheduler.php
has 387 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Zeus\Kernel\ProcessManager;
use Zend\EventManager\EventInterface;
Message
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
final class Message implements MessageComponentInterface, HeartBeatMessageInterface
{
const COMMAND_LINE = 1;
const DATA_LINE = 2;
File Message.php
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Zeus\ServerService\Http\Message;
use Zeus\ServerService\Http\Message\Helper\ChunkedEncoding;
Function startPlugins
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
protected function startPlugins(ContainerInterface $container, $service, array $config)
{
foreach ($config as $index => $value) {
if (is_int($index)) {
if (is_object($value) && $value instanceof ListenerAggregateInterface) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function parseRequestFileData
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function parseRequestFileData(Request $request)
{
$body = $request->getContent();
$boundaryLine = $this->getMultipartDataBoundary($request);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function onMessage
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function onMessage(ConnectionInterface $connection, $message)
{
if ($connection instanceof FlushableConnectionInterface) {
$connection->setWriteBufferSize(0);
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Scheduler
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
final class Scheduler implements EventsCapableInterface
{
use LoggerHelper;
use EventManager;
use PluginRegistry;
Method stats
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function stats()
{
$stats = [
'pid' => getmypid(),
'uptime' => time() - $_SERVER['REQUEST_TIME'],
Function onProcessLoop
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function onProcessLoop(SchedulerEvent $event)
{
$exception = null;
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function decodeChunkedRequestBody
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function decodeChunkedRequestBody(Request $request, & $message)
{
$this->buffer .= $message;
while (true) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
ProcessState
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class ProcessState
{
/**
* Process is waiting.
*/
Method onMessage
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function onMessage(ConnectionInterface $connection, $message)
{
if ($connection instanceof FlushableConnectionInterface) {
$connection->setWriteBufferSize(0);
}
Message
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Message implements MessageComponentInterface, HeartBeatMessageInterface
{
use ChunkedEncoding;
use RegularEncoding;
use FileUpload;
Config
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Config extends \Zend\Config\Config implements ConfigInterface
{
/**
* Config constructor.
* @param mixed[]|ConfigInterface $fromArray
Manager
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
final class Manager
{
use EventManager;
use PluginRegistry;
Function join
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function join($callId)
{
$callIds = is_array($callId) ? $callId : [$callId];
$results = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getStatus
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getStatus(ServerServiceInterface $service)
{
$this->scheduler = $service->getScheduler();
$console = $this->console;
Method parseRequestFileData
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function parseRequestFileData(Request $request)
{
$body = $request->getContent();
$boundaryLine = $this->getMultipartDataBoundary($request);