projek-xyz/slim-framework

View on GitHub
src/Database/Migrator.php

Summary

Maintainability
B
5 hrs
Test Coverage

Showing 4 of 4 total issues

Function migratePhp has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

protected function migratePhp($filepath, $action = 'up')
{
$migration = require $filepath;
$callable = null;
$schema = $this->newBlueprint();
Severity: Minor
Found in src/Database/Migrator.php - About 2 hrs to fix

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

public function migrate($action = 'up')
{
$migrated = 0;
 
try {
Severity: Minor
Found in src/Database/Migrator.php - About 1 hr to fix

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

    protected function migratePhp($filepath, $action = 'up')
    {
    $migration = require $filepath;
    $callable = null;
    $schema = $this->newBlueprint();
    Severity: Minor
    Found in src/Database/Migrator.php - About 1 hr to fix

      Function migrate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      public function migrate($action = 'up')
      {
      $migrated = 0;
       
      try {
      Severity: Minor
      Found in src/Database/Migrator.php - About 1 hr to fix
      Category
      Status