Skip to content

Conversation

@khalilst
Copy link

This PR removes MOST of the column type methods and handle them using __call method.
It will support the probably missing types.

And it reduced files size from 8360 to 4415 (46% lower) and line count from 348 to 175 (49% lower).

@khalilst khalilst force-pushed the type-methods-by-magic-method-call branch from f790287 to 0fb141f Compare June 26, 2021 05:18
@khalilst khalilst force-pushed the type-methods-by-magic-method-call branch from 0fb141f to a157287 Compare June 26, 2021 05:44
return "character({$column->length})";
}
if(substr($method, 0, 4) === 'type') {
$type = substr($method, 4, strlen($method) - 4);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@khalilst it should also use strtolower to ensure types work no matter how many capital letters are used.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rogervila updated after 3 years here: d5e9b16

@khalilst khalilst requested a review from rogervila September 1, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants