Fix PHPStan issues

This commit is contained in:
Oliver Davies 2020-09-04 20:49:23 +01:00
parent a08f93c188
commit 98fba9306f
6 changed files with 10 additions and 8 deletions

View file

@ -5,13 +5,13 @@
* Functions to support theming in the Tailwind CSS theme.
*/
use Drupal\custom\Entity\Node\Post;
use Drupal\opdavies_blog\Entity\Node\Post;
/**
* Implements hook_preprocess_HOOK().
*/
function opdavies_preprocess_page(array &$variables): void {
/** @var \Drupal\custom\Entity\Node\Post|null $node */
/** @var Post|null $node */
$node = $variables['node'] ?? NULL;
if (!$node) {
return;