Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Improve formatPostGisType method readability #30593

merged 2 commits into from Nov 15, 2019


Copy link

antonkomarev commented Nov 14, 2019

Follow-up to the PR #30545

It's hard to read the code because too many parenthesis and alternation of different quotes. This PR replaces it with sptrinf method and breaks down inline ternary operator.

return sprintf('geometry(%s, %s)', $type, $column->projection);
return "geometry({$type})";

This comment has been minimized.

Copy link

kreitje Nov 14, 2019


Do you need this? Above you are checking if it's null, and then check if it's not null.

This comment has been minimized.

Copy link

driesvints Nov 14, 2019


@kreitje Different property.

@taylorotwell taylorotwell merged commit b12f4be into laravel:6.x Nov 15, 2019
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed
@antonkomarev antonkomarev deleted the cybercog:refactor/improve-readability branch Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.