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 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 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 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 getPanel
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPanel()
{
ob_start();
phpinfo();
$phpInfo = ob_get_contents();
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;