KumbiaPHP/ActiveRecord

View on GitHub
ActiveRecord.php

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 3 of 3 total issues

ActiveRecord has 22 functions (exceeds 20 allowed). Consider refactoring.
Open

class ActiveRecord extends LiteRecord implements \JsonSerializable
{
const BELONG_TO = 1;
const HAS_MANY = 2;
const HAS_ONE = 3;
Severity: Minor
Found in ActiveRecord.php - About 2 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    public static function hasOne($name, $class, $via = null)
    {
    $str = strtolower($name);
    $name = static::getTable();
    static::$relations[$str] = (object) [
    Severity: Minor
    Found in ActiveRecord.php and 1 other location - About 30 mins to fix
    ActiveRecord.php on lines 49..58

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    public static function hasMany($name, $class, $via = null)
    {
    $str = strtolower($name);
    $name = static::getTable();
    static::$relations[$str] = (object) [
    Severity: Minor
    Found in ActiveRecord.php and 1 other location - About 30 mins to fix
    ActiveRecord.php on lines 60..69

    There are no issues that match your filters.

    Category
    Status