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

method isActive works incorrect #24

Open
belousAleksandr opened this issue Apr 23, 2024 · 1 comment
Open

method isActive works incorrect #24

belousAleksandr opened this issue Apr 23, 2024 · 1 comment

Comments

@belousAleksandr
Copy link

public function isActive(): bool
{
    if (empty($this->parser->getData()['stare_inactiv']['statusInactivi'] ?? null) || !is_bool($this->parser->getData()['stare_inactiv']['statusInactivi'] ?? null)) {
        return false;
    }

    return !$this->parser->getData()['stare_inactiv']['statusInactivi'] ?? false;
}

this method always returns false. For function empty() false is also empty value.

@cdarken
Copy link

cdarken commented Jul 11, 2024

I think the entire function should be written as:

public function isActive(): bool
{
    return !$this->parser->getData()['stare_inactiv']['statusInactivi'];
}

As I understand the code above was for an older version of the API.

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

No branches or pull requests

2 participants