brokencube/automatorm

View on GitHub

Showing 113 of 452 total issues

Avoid too many return statements within this method.
Open

            return true;
Severity: Major
Found in src/Orm/Data.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return 'MODEL_DATA:MODEL_EXPECTED_FOR_KEY: Property "'.$column.'" expected a Model object, but you gave it a variable of type "'.$type.'"';
    Severity: Major
    Found in src/Exception/Model.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                      return 'MODEL_DATA:CANNOT_SET_EXTERNAL_KEYS_TO_THIS_TABLE: Property "'.$column.'" represents a list of objects that have a foreign key that refers to this object. To change this, you must update those objects - you cannot alter this relationship from here.';
      Severity: Major
      Found in src/Exception/Model.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return new Collection();
        Severity: Major
        Found in src/Orm/Data.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return true;
          Severity: Major
          Found in src/Orm/Data.php - About 30 mins to fix

            Avoid too many return statements within this method.
            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: Major
            Found in src/Exception/Model.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return 'MODEL_DATA:DATETIME_VALUE_EXPECTED_FOR_COLUMN: Column "'.$column.'" has been declared as a Datetime field - you tried to set it to "'.$value.'". You can set DateTime fields by passing it: Orm\Date objects, \DateTime objects, strings that resolve when strtotime\'d, unix_timestamps, or null (for nullable columns)';
              Severity: Major
              Found in src/Exception/Model.php - About 30 mins to fix

                Avoid too many return statements within this method.
                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. You probably meant to pass this object to column "'.substr($column, 0, -3).'". ';
                Severity: Major
                Found in src/Exception/Model.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return $this->joinM21($var, true);
                  Severity: Major
                  Found in src/Orm/Data.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    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: Major
                    Found in src/Exception/Model.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return 'MODEL:CALLED_GROUP_JOIN_ON_UNKNOWN_FOREIGN_PROPERTY: Tried to call join on property (' . $var . ') on Collection but was not a recognised foreign key';
                      Severity: Major
                      Found in src/Exception/Model.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                            return 'MODEL_DATA:MODEL_EXPECTED_FOR_KEY: Property "'.$column.'" expected a Model object, but you gave it an integer - Perhaps you meant to set "'.$column.'_id" instead?';
                        Severity: Major
                        Found in src/Exception/Model.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return $this->joinM2M($var, $where, true);
                          Severity: Major
                          Found in src/Orm/Data.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            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: Major
                            Found in src/Exception/Model.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                          return $this->join12M($var, $where, true);
                              Severity: Major
                              Found in src/Orm/Data.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                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: Major
                                Found in src/Exception/Model.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                  return 'MODEL_DATA:CANNOT_DELETE_UNCOMMITED_DATA: You cannot mark a Data object for deletion if it does not represent an existing row in the database.';
                                  Severity: Major
                                  Found in src/Exception/Model.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                return $this->join12M($var, $where);
                                    Severity: Major
                                    Found in src/Orm/Data.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                      return $value1 < $value2;
                                      Severity: Major
                                      Found in src/OperatorParser.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        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: Major
                                        Found in src/Exception/Model.php - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language