Showing 32 of 36 total issues
Function getServiceMap
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
private function getServiceMap()
{
$result = [
'transport' => 'POST',
'envelope' => 'JSON-RPC-2.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
Method getMemoryChart
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getMemoryChart()
{
$colors = [
'axis' => '#000000',
'gridLines' => '#cccccc',
Function validateCall
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
private function validateCall(\stdClass $call)
{
$result = null;
$error = null;
$data = null;
- 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 __invoke
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __invoke(Request $request, Response $response, callable $next)
{
$res = $next($request, $response);
$cookies = json_decode($request->getCookieParam('tracyPanelsEnabled'));
Function completion
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function completion($token, $environment, $pattern)
{
$result = $this->initialize($token, $environment);
if ($result) {
return $result;
- 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 __invoke
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function __invoke(Request $request, Response $response, callable $next)
{
$res = $next($request, $response);
$cookies = json_decode($request->getCookieParam('tracyPanelsEnabled'));
- 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
File BaseJsonRpcServer.php
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace RunTracy\Helpers\Console;
/**
Method getPanel
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPanel()
{
$out = '
<script>
function getSelectedTracyPanelCheckboxes() {
Method validateCall
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function validateCall(\stdClass $call)
{
$result = null;
$error = null;
$data = null;
Method getPanel
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPanel()
{
$table = '
<style type="text/css">
.tracy-inner {
Function execute
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$ret = [];
do {
// check for SMD Discovery 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
Method getServiceMap
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getServiceMap()
{
$result = [
'transport' => 'POST',
'envelope' => 'JSON-RPC-2.0',
Method getTab
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTab()
{
$this->icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 532 178" style="width: 35px"><path '.
'fill="#016301" d="m439 153.67c-13.839-3.3534-27.492-13.852-34.543-26.563-1.9832-3.575-4.8271-10.55-'.
'6.3198-15.5-2.4268-8.0476-2.7156-10.587-2.7288-24-0.0174-17.571 1.7519-25.761 8.271-38.287 7.21-13.853'.
Method getTab
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTab()
{
// Set blinker to work with no active panel
$head = '
<style type="text/css">
Method completion
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function completion($token, $environment, $pattern)
{
$result = $this->initialize($token, $environment);
if ($result) {
return $result;
Method execute
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
$ret = [];
do {
// check for SMD Discovery request
Function getRequest
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function getRequest()
{
$error = null;
do {
- 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 authenticateToken
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function authenticateToken($token)
{
if ($this->noLogin) {
return 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
Method getMetaData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getMetaData()
{
if (empty($this->metaData)) {
$this->metaData[self::META_TIME_LINE] = [];
$this->metaData[self::META_MEMORY_PEAK] = 0;
Method getTab
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTab()
{
$this->icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 480" version="1.1" width="16px" '.
'height="16px"><path fill="#043CBF" d="m221.25 479.1c-79.88-6.85-150.37-51.83-189.99-121.24-14.666-'.
'25.69-23.972-53.8-29.552-89.27-0.70825-4.5-1.1632-16.11-1.1384-29.06 0.04489-23.34 1.5027-35.94 6.5464'.