Branch: refs/heads/master Home: https://github.com/phpmyadmin/phpmyadmin Commit: dea4c972afce6ba8d7bc904d2706924befc503de https://github.com/phpmyadmin/phpmyadmin/commit/dea4c972afce6ba8d7bc904d2706924befc503de Author: Kamil Tekiela <[email protected]> Date: 2021-12-02 (Thu, 12 December 2021) -03:00
Changed paths: M libraries/classes/Relation.php M psalm-baseline.xml Log Message: ----------- Refactor relations.php (#17210) * Refactor getComments() Use early return and remove redundant if statement. Signed-off-by: Kamil Tekiela <[email protected]> * Fix indentation Signed-off-by: Kamil Tekiela <[email protected]> * Remove temporary variable Signed-off-by: Kamil Tekiela <[email protected]> * Remove redundant code Remove redundant if statement. Break at the end of the loop. elseif when there is no other choice. Redundant ! empty(). Signed-off-by: Kamil Tekiela <[email protected]> * Collapse if statement into an elvis operator Signed-off-by: Kamil Tekiela <[email protected]> * Better type hinting for return array We can tell Psalm what to expect, but we should declare the variables first. Signed-off-by: Kamil Tekiela <[email protected]> * Remove dead code Signed-off-by: Kamil Tekiela <[email protected]> * Use array_keys instead of unused variable Signed-off-by: Kamil Tekiela <[email protected]> * Add type declaration and psalm-return Signed-off-by: Kamil Tekiela <[email protected]> * Add psalm-return to checkChildForeignReferences() Also added type declaration, and simplified the code Signed-off-by: Kamil Tekiela <[email protected]> * Refactor getChildReferences() Signed-off-by: Kamil Tekiela <[email protected]> * Improve type inference for foreignDropdown Signed-off-by: Kamil Tekiela <[email protected]> * [bugfix] Cast the value to a string to avoid type mismatch. Signed-off-by: Kamil Tekiela <[email protected]> * Add proper string type declaration to $foreign_filter Signed-off-by: Kamil Tekiela <[email protected]> _______________________________________________ Git mailing list [email protected] https://lists.phpmyadmin.net/mailman/listinfo/git
