fathomminds/php-rest-models

View on GitHub
src/Database/MongoDB/Resource.php

Summary

Maintainability
A
1 hr
Test Coverage

Method patch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function patch($resourceId, $newResource)
    {
        try {
            if (isset($newResource->{$this->primaryKey})) {
                unset($newResource->{$this->primaryKey});
Severity: Minor
Found in src/Database/MongoDB/Resource.php - About 1 hr to fix

    Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function __construct($resourceName, $schemaClass, $primaryKey, Client $client = null, $databaseName = null)
    Severity: Minor
    Found in src/Database/MongoDB/Resource.php - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status