Showing 20 of 20 total issues
Function performAction
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public function performAction()
{
$schema = new Schema();
if ($this->schema) {
- 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 performAction
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function performAction()
{
$schema = new Schema();
if ($this->schema) {
Function performAction
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function performAction()
{
try {
$skipRoot = false;
$baseName = 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
Function performAction
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function performAction()
{
try {
$skipRoot = false;
$baseName = 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 performAction
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function performAction()
{
try {
$skipRoot = false;
$baseName = null;
Method performAction
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function performAction()
{
try {
$skipRoot = false;
$baseName = null;
Function loadSchema
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function loadSchema(&$skipRoot, &$baseName)
{
if ($this->schema === '-') {
$this->schema = 'php://stdin';
}
- 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 loadSchema
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function loadSchema(&$skipRoot, &$baseName)
{
if ($this->schema === '-') {
$this->schema = 'php://stdin';
}
Method performAction
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function performAction()
{
$listener = new FilePosition\PositionResolver();
$stream = fopen($this->path, 'r');
if ($stream === false) {
Function loadFile
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function loadFile()
{
$dataValue = Base::readJsonOrYaml($this->schema, $this->response);
if (!$dataValue) {
throw new ExitCode('Unable to find schema in ' . $this->schema, 1);
- 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 performAction
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function performAction()
{
$listener = new FilePosition\PositionResolver();
$stream = fopen($this->path, 'r');
if ($stream === false) {
- 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 makeGoBuilderOptions
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function makeGoBuilderOptions()
{
$options = new Options();
if (!empty($this->config)) {
$data = file_get_contents($this->config);
Method setUpBuilderOptions
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setUpBuilderOptions($options)
{
$options->showConstProperties = Option::create()
->setDescription('Show properties with constant values, hidden by default');
Method performAction
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function performAction()
{
try {
$skipRoot = false;
$baseName = null;
Function performAction
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function performAction()
{
$this->prePerform();
if (null === $this->diff) {
return;
- 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 makeGoBuilderOptions
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function makeGoBuilderOptions()
{
$options = new Options();
if (!empty($this->config)) {
$data = file_get_contents($this->config);
- 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 performAction
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function performAction()
{
try {
$skipRoot = false;
$baseName = 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
Function performAction
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function performAction()
{
if ($this->schema) {
$schemaData = $this->readData($this->schema);
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 postPerform
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function postPerform()
{
$options = JSON_UNESCAPED_SLASHES + JSON_UNESCAPED_UNICODE;
if ($this->pretty) {
$options += JSON_PRETTY_PRINT;
- 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 performAction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function performAction()
{
try {
$skipRoot = false;
$baseName = 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"