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 some code #3218

Merged
merged 6 commits into from
Jul 7, 2022
Merged

Conversation

mehdihasanpour
Copy link
Contributor

No description provided.

return false;
}
return true;
return ! (stripos($file, 'non-readable.cache') !== false)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can simply do this:

return stripos($file, 'non-readable.cache') === false;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this is a better way.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also unwrap the code parentheses?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I unwrapped the code parentheses.

return false;
}
return true;
return ! (stripos($path, 'non-writable-directory') !== false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

@l0gicgate l0gicgate added this to the 4.11.0 milestone Jul 7, 2022
@coveralls
Copy link

coveralls commented Jul 7, 2022

Coverage Status

Coverage decreased (-0.0002%) to 99.892% when pulling c3dbd54 on mehdihasanpour:refactor-some-code into 2d2a295 on slimphp:4.x.

@l0gicgate l0gicgate merged commit 484a32a into slimphp:4.x Jul 7, 2022
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.

None yet

4 participants