Risoluto/Risoluto-Core

View on GitHub

Showing 66 of 128 total issues

File DbTest4GetAttribute.php has 518 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * DbTest4getAttribute
 *
 * Db::getAttribute()用テストケース
Severity: Major
Found in risoluto/lib/vendor_test/Risoluto/DbTest/DbTest4GetAttribute.php - About 1 day to fix

File DateTest4GenDay.php has 416 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * DateTest4genDay
 *
 * Date::genDay用テストケース
Severity: Minor
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenDay.php - About 6 hrs to fix

Function checkEnteredUserData has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    public function checkEnteredUserData( $target, $csrf_token, $selfno = '' )
    {
        // 戻り値を初期化
        $retval = [ ];
        $retval[ 'entered' ] = [ ];
Severity: Minor
Found in risoluto/apps/RisolutoApps/Admin/AdminCommon.php - About 4 hrs to fix

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 checkEnteredGroupData has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    public function checkEnteredGroupData( $target, $csrf_token, $selfno = '' )
    {
        // 戻り値を初期化
        $retval = [ ];
        $retval[ 'entered' ] = [ ];
Severity: Minor
Found in risoluto/apps/RisolutoApps/Admin/AdminCommon.php - About 3 hrs to fix

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 checkEnteredUserData has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function checkEnteredUserData( $target, $csrf_token, $selfno = '' )
    {
        // 戻り値を初期化
        $retval = [ ];
        $retval[ 'entered' ] = [ ];
Severity: Major
Found in risoluto/apps/RisolutoApps/Admin/AdminCommon.php - About 3 hrs to fix

File DateTest4GenMinSec.php has 275 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * DateTest4GenMinSec
 *
 * Date::GenMinSec用テストケース
Severity: Minor
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenMinSec.php - About 2 hrs to fix

Method test_GenMinSec_Args1 has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_GenMinSec_Args1()
    {
        $want = [
            '' => '',
            '00' => '00',
Severity: Major
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenMinSec.php - About 2 hrs to fix

Method test_GenMinSec_Args3 has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_GenMinSec_Args3()
    {
        $want = [
            '--' => '--',
            '00' => '00',
Severity: Major
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenMinSec.php - About 2 hrs to fix

Method test_GenMinSec_Args2 has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_GenMinSec_Args2()
    {
        $want = [
            '--' => '',
            '00' => '00',
Severity: Major
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenMinSec.php - About 2 hrs to fix

Method test_MinSec_NoArgs has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_MinSec_NoArgs()
    {
        $want = [
            '00' => '00',
            '01' => '01',
Severity: Major
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenMinSec.php - About 2 hrs to fix

Method checkEnteredGroupData has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function checkEnteredGroupData( $target, $csrf_token, $selfno = '' )
    {
        // 戻り値を初期化
        $retval = [ ];
        $retval[ 'entered' ] = [ ];
Severity: Major
Found in risoluto/apps/RisolutoApps/Admin/AdminCommon.php - About 2 hrs to fix

Function run has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    public function run( array $options )
    {
        // 引数がなければ使用方法を表示する
        if (empty( $options ) or ( count( $options ) > 1 )) {
            $this->usage();
Severity: Minor
Found in risoluto/cli/RisolutoCli/AuthManager.php - About 1 hr to fix

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 run has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function run( array $options )
    {
        // 引数がなければ使用方法を表示する
        if (empty( $options ) or ( count( $options ) > 1 )) {
            $this->usage();
Severity: Minor
Found in risoluto/cli/RisolutoCli/AuthManager.php - About 1 hr to fix

Method test_ExecAndTransaction_ExecWithInTrans has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_ExecAndTransaction_ExecWithInTrans()
    {
        $params = [
            "driver" => $GLOBALS[ 'DB_DRIVER' ],
            "user" => $GLOBALS[ 'DB_USER' ],

Method test_genDay_Args1 has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_genDay_Args1()
    {
        $want = [
            '' => '',
            '01' => '01',
Severity: Minor
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenDay.php - About 1 hr to fix

Method checkEnteredSelfData has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function checkEnteredSelfData( $target, $csrf_token, $no )
    {
        // 戻り値を初期化
        $retval = [ ];
        $retval[ 'entered' ] = [ ];
Severity: Minor
Found in risoluto/apps/RisolutoApps/Admin/AdminCommon.php - About 1 hr to fix

Method test_genDay_Args2 has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_genDay_Args2()
    {
        $want = [
            '--' => '',
            '01' => '01',
Severity: Minor
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenDay.php - About 1 hr to fix

Method test_genDay_Args4_January has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_genDay_Args4_January()
    {
        $want = [
            '--' => '--',
            '01' => '01',
Severity: Minor
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenDay.php - About 1 hr to fix

Method test_genDay_Args3 has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_genDay_Args3()
    {
        $want = [
            '--' => '--',
            '01' => '01',
Severity: Minor
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenDay.php - About 1 hr to fix

Method test_genDay_NoArgs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function test_genDay_NoArgs()
    {
        $want = [
            '01' => '01',
            '02' => '02',
Severity: Minor
Found in risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenDay.php - About 1 hr to fix
Severity
Category
Status
Source
Language