brokencube/automatorm

View on GitHub

Showing 452 of 452 total issues

Line exceeds 120 characters; contains 249 characters
Open

                    return 'MODEL_DATA:UNEXPECTED_COLUMN_NAME: Property "'.$column.'" does not exist in the schema for this object ('.$model['table_name'].'), but "'.$column.'_id" does. You probably haven\'t set up the foreign key for this column!';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 130 characters
Open

            throw new \InvalidArgumentException('Orm\Collection::__construct() expects an array - ' . gettype($array) . ' given');
Severity: Minor
Found in src/Orm/Collection.php by phpcodesniffer

Line exceeds 120 characters; contains 134 characters
Open

    final public static function factory($where, $classOrTablename = null, $schema = null, array $options = [], $singleResult = false)
Severity: Minor
Found in src/Orm/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 139 characters
Open

    // Return an empty Model_Data object for this class/table so that a new object can be constructed (and a new row entered in the table).
Severity: Minor
Found in src/Orm/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 134 characters
Open

                    // If the column name is named based on the foreign table name, then use the pivot table name as the property name

Line exceeds 120 characters; contains 125 characters
Open

                        // needs to have a unique name for at least one of the columns (which is not based on the table name)

Line exceeds 120 characters; contains 263 characters
Open

                return 'NO_SCHEMA: Could not find a schema definition for this object (' . $classOrTable . '). Are you sure the classname and table are the same (case-insensitive). Otherwise, try calling Model::generate_schema(true) to refresh the schema cache.';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 155 characters
Open

                return 'MODEL_DATA:MODEL_EXPECTED_FOR_KEY: Property "'.$column.'" expected a Model object, but you gave it a variable of type "'.$type.'"';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 340 characters
Open

                return 'MODEL_DATA:CANNOT_CALL_MULTIPIVOT_AS_PROPERTY: Property "'.$column.'" represents a M-M (Pivot) relationship with more than two keys. As we don\'t know which type of object to return (as there are multiple choices), you can\'t call this link as a simple property. Use the $model->property([\$where]) syntax instead.';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 205 characters
Open

                return 'MODEL_DATA:INCORRECT_MODEL_FOR_RELATIONSHIP: Property "'.$column.'" expected a Model relating to table "'.$expectedTable.'" but a Model for "'.$suppliedTable.'" was given instead.';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Inline control structures are not allowed
Open

        if (!$this->container) return new static();
Severity: Minor
Found in src/Orm/Collection.php by phpcodesniffer

Line exceeds 120 characters; contains 141 characters
Open

            if (!$obj = isset(Model::$instance[$namespace][$table][$row['id']]) ? Model::$instance[$namespace][$table][$row['id']] : false) {
Severity: Minor
Found in src/Orm/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 218 characters
Open

                return 'MODEL_DATA:SET_WHEN_LOCKED: It appears you tried to assign a new value to the "'.$column.'" column directly on the $obj->_data object - Updates should be done via a call to $obj->db() instead!';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 218 characters
Open

                return 'MODEL_DATA:ARRAY_EXPECTED_FOR_PIVOT: Property "'.$column.'" represents a M-M (Pivot) relationship. It expects an array of Model objects, but you gave it a variable of type "'.$type.'" instead.';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 258 characters
Open

                return 'MODEL_DATA:MODEL_EXPECTED_IN_PIVOT_ARRAY: Property "'.$column.'" represents a M-M (Pivot) relationship. You successfully passed an array to this property, but it was expecting an array of Model objects and you gave it an "'.$type.'"';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 121 characters
Open

            // We have a data object, call replacement constructor after storing in the cache list (to prevent recursion)
Severity: Minor
Found in src/Orm/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 154 characters
Open

            ->join([Schema::underscoreCase($pivot['connections'][0]['schema']), Schema::underscoreCase($pivot['connections'][0]['table']) => 'pivotjoin'])

Line exceeds 120 characters; contains 151 characters
Open

                return 'ERROR_DURING_MASS_ASSIGNMENT: During ->assignData(), the following exception occurred: ' . $e->makeMessage($e->code, $e->data);
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 329 characters
Open

                    return 'MODEL_DATA:ARRAY_EXPECTED_FOR_PIVOT: Property "'.$column.'" represents a M-M (Pivot) relationship. It expects an array of Model objects, but you gave it a Model object. If you intended to replace all of the objects in this join with a single object, you should wrap your Model object in array first.';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer

Line exceeds 120 characters; contains 225 characters
Open

                return 'MODEL_DATA_UPDATE:PIVOT_INCORRECT_OBJECT_TYPE: Trying to update property "'.$table.'" (pivot:.'.$pivot['pivot'].') - Was expecting an array of "'.$pivot['table'].'" objects, but found a "'.$class.'"!';
Severity: Minor
Found in src/Exception/Model.php by phpcodesniffer
Severity
Category
Status
Source
Language