[phpMyAdmin Git] [phpmyadmin/phpmyadmin] f7f872: Refactor insert edit (#17684)
tekiela246 at gmail.com
Tue Aug 23 03:39:57 CEST 2022
Author: Kamil Tekiela <tekiela246 at gmail.com>
Date: 2022-08-22 (Mon, 08 August 2022) -03:00
Refactor insert edit (#17684)
This is a major redesign of the code that handles these four actions: in-place edit(AJAX), edit of multiple rows, copying of rows, and insertion of new rows. The goal is to make the code easier to read and more understandable.
I introduced a new DTO for better readability.
Some of the methods were made private to the model
The controller has access to two methods for getting the value for INSERT and for UPDATE
Unfortunately, I have introduced method envy on EditField, but I do not want to move the functionality away from InsertEdit.php
Unit tests have not improved in readability but I added helpful comments explaining what we are testing. There's probably a way to improve it too.
I will probably merge all commits once I decide it's ready for review.
Signed-off-by: Kamil Tekiela <tekiela246 at gmail.com>
More information about the Git