brokencube/automatorm

View on GitHub

Showing 452 of 452 total issues

Line exceeds 120 characters; contains 121 characters
Open

        $query = QueryBuilder::select([$pivotSchema['table_schema'], $pivotSchema['table_name'] => 'pivot'], ['pivot.*'])

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 121 characters
Open

     * Return a plain PHP array version of the internal container using the supplied key/value values of the model object
Severity: Minor
Found in src/Orm/Collection.php by phpcodesniffer

Line exceeds 120 characters; contains 124 characters
Open

                    // Outersect of tables to create an array of all OTHER foreign keys in this table, for this foreign key.

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 225 characters
Open

                return 'MODEL_DATA:UNEXPECTED_COLUMN_NAME: Property "'.$column.'" does not exist in the schema for this object ('.$model['table_name'].'). Please check the $model for this object, or look at $obj->var_dump()';
Severity: Minor
Found in src/Exception/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 140 characters
Open

            SELECT b.table_schema, b.table_name, b.column_name, b.referenced_table_schema, b.referenced_table_name, b.referenced_column_name

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

Inline control structures are not allowed
Open

                if ($tableName) yield $tableName => $keys;

Line exceeds 120 characters; contains 140 characters
Open

            SELECT b.table_schema, b.table_name, b.column_name, b.referenced_table_schema, b.referenced_table_name, b.referenced_column_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 121 characters
Open

                    $keys[$matches[1]] = ['table' => $matches[3], 'schema' => $matches[2], 'column_name' => $matches[4]];

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 211 characters
Open

                    return 'MODEL_DATA:SCALAR_VALUE_EXPECTED_FOR_COLUMN: Property "'.$column.'" on this object is a database column which can only accept scalar values. You tried to assign a "'.$type.'" to it.';
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

Line exceeds 120 characters; contains 209 characters
Open

                return 'MODEL_DATA:UNKNOWN_FOREIGN_PROPERTY: Tried to access a foreign key not defined in the schema ('.$data['property'].'). Maybe try dump()ing this object to check what keys are available?';
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