Showing 54 of 102 total issues
Function validateLength
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
case 'CHAR':
- 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 Teradata.php
has 510 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
namespace Keboola\Datatype\Definition;
Function validateLength
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
case self::TYPE_NUMBER:
- 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 validateLength
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
case 'DECIMAL':
- 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 validateLength
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
case 'CHAR':
File Exasol.php
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
namespace Keboola\Datatype\Definition;
File Redshift.php
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
namespace Keboola\Datatype\Definition;
Method validateCompression
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function validateCompression(string $type, string $compression): void
{
$valid = true;
$type = strtoupper($type);
switch (strtoupper($compression)) {
Method validateLength
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
case self::TYPE_NUMBER:
File Snowflake.php
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
namespace Keboola\Datatype\Definition;
Method validateLength
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
case 'DECIMAL':
Method validateLength
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
Function validateLength
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
case self::TYPE_FLOAT:
- 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 validateCompression
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
private function validateCompression(string $type, string $compression): void
{
$valid = true;
$type = strtoupper($type);
switch (strtoupper($compression)) {
- 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 validateLength
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
Method getDefaultLength
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getDefaultLength()
{
$out = null;
switch ($this->type) {
// decimals
Function validateLength
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
- 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 MySQL.php
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
namespace Keboola\Datatype\Definition;
Method validateLength
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function validateLength(string $type, $length = null): void
{
$valid = true;
switch (strtoupper($type)) {
case self::TYPE_FLOAT:
Method getBasetype
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getBasetype(): string
{
switch (strtoupper($this->type)) {
case self::TYPE_INT:
case self::TYPE_INTEGER: