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

Refactor to use less or no static properties #14

Closed
omitobi opened this issue Apr 14, 2020 · 0 comments · Fixed by #51
Closed

Refactor to use less or no static properties #14

omitobi opened this issue Apr 14, 2020 · 0 comments · Fixed by #51

Comments

@omitobi
Copy link
Owner

omitobi commented Apr 14, 2020

Maybe by using something like this so that if statement can remain non-static but callable statically?

public static function __callStatic($method, $parameters)
{
    if($method === 'if' and !self::ifCalled) {
        return (new static)->$method(...$parameters);
    }
}

Reviewable under the spec of best practices and performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant