eidng8/sttbot

View on GitHub
tests/Wiki/Templates/MissionListTest.php

Summary

Maintainability
F
3 days
Test Coverage

File MissionListTest.php has 624 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Created by PhpStorm.
 * User: JC
 * Date: 2016-11-18
Severity: Major
Found in tests/Wiki/Templates/MissionListTest.php - About 1 day to fix

MissionListTest has 24 functions (exceeds 20 allowed). Consider refactoring.
Open

class MissionListTest extends TestCase
{
    private $wiki;

    /**
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 2 hrs to fix

Method checkCadetAdvStep3 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkCadetAdvStep3(Mission $model)
    {
        $step = $model->steps[2];
        $this->assertInstanceOf(MissionStep::class, $step);
        $this->assertCount(2, $step->skills);
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

Method checkCadetStep3 has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkCadetStep3(Mission $model)
    {
        $step = $model->steps[2];
        $this->assertInstanceOf(MissionStep::class, $step);
        $this->assertCount(2, $step->skills);
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

Method checkExportedMissionSteps has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkExportedMissionSteps(array $mission)
    {
        $this->assertArrayHasKey(
            'steps',
            $mission,
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

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

    private function checkCadetAdvStep4(Mission $model)
    {
        $step = $model->steps[3];
        $this->assertInstanceOf(MissionStep::class, $step);
        $this->assertCount(2, $step->skills);
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

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

    private function checkCadetStep4(Mission $model)
    {
        $step = $model->steps[3];
        $this->assertInstanceOf(MissionStep::class, $step);
        $this->assertCount(2, $step->skills);
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

Method checkExportedMissionCost has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkExportedMissionCost(array $mission)
    {
        $this->assertArrayHasKey(
            'cost',
            $mission,
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

Method checkExportedStepRequirements has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkExportedStepRequirements(
        array $step,
        int $idx,
        string $mission
    ) {
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

Method checkCadetStep1 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkCadetStep1(Mission $model)
    {
        $step = $model->steps[0];
        $this->assertInstanceOf(MissionStep::class, $step);
        $this->assertCount(1, $step->skills);
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

Method checkCadetAdvStep1 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkCadetAdvStep1(Mission $model)
    {
        $step = $model->steps[0];
        $this->assertInstanceOf(MissionStep::class, $step);
        $this->assertCount(1, $step->skills);
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

Method checkCadetStep5 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkCadetStep5(Mission $model)
    {
        $step = $model->steps[4];
        $this->assertInstanceOf(MissionStep::class, $step);
        $this->assertCount(1, $step->skills);
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

Method checkCadetAdvStep5 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function checkCadetAdvStep5(Mission $model)
    {
        $step = $model->steps[4];
        $this->assertInstanceOf(MissionStep::class, $step);
        $this->assertCount(1, $step->skills);
Severity: Minor
Found in tests/Wiki/Templates/MissionListTest.php - About 1 hr to fix

There are no issues that match your filters.

Category
Status