Currently in code we have two problems. One is that we have inconsistency in data type returned by model functions. Some return StdClass and others return arrays. The other is that neither option offers type safety. CodeIgniter introduced Entities to represent a row in the database and arrays of entities to represent multiple rows.
@coderabbitai what would be the benefits and drawbacks of refactoring code to return entities as a convention? Does a change like this do anything to simplify model code as currently models in this project are doing too much? Are there other considerations we should be thinking about?
Currently in code we have two problems. One is that we have inconsistency in data type returned by model functions. Some return StdClass and others return arrays. The other is that neither option offers type safety. CodeIgniter introduced Entities to represent a row in the database and arrays of entities to represent multiple rows.
@coderabbitai what would be the benefits and drawbacks of refactoring code to return entities as a convention? Does a change like this do anything to simplify model code as currently models in this project are doing too much? Are there other considerations we should be thinking about?