Automattic / Automattic/VIP-Coding-Standards
Add warning for list_files function and related
- Dominant language
- PHP
- Stars
- 261
- Forks
- 44
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Description
## What problem would the enhancement address for VIP?
I've recently been doing a code review and noticed the `list_files` function had no warning attached. On VIP Filesystem, the `list_files`, `scandir`, `opendir` will return empty result sets or false, so we should probably highlight this to customers to avoid unexpected results.
## Describe the solution you'd like
A warning should be added when the following functions are coded:
- list_files - WP
- scandir - PHP
- opendir - PHP
## What code should be reported as a violation?
```
$files = list_files( $folder, 2 );
```
## What code should *not* be reported as a violation?
## Additional context
Contributor guide
Assessment
This issue has not been assessed yet.