Problem/Motivation
config_pages_config() can return NULL but the docblock does not acknowledge that.
Steps to reproduce
When doing something like this:
if ($page = config_pages_config('foo')) {
// Do something with it
}
drupal-check is complaining:
If condition is always true.
Proposed resolution
The return type should be \Drupal\config_pages\Entity\ConfigPages|null.
Remaining tasks
I will submit a patch.
Issue fork config_pages-3218959
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
prudloff commentedComment #4
shumer commented