phpstan-drupal icon indicating copy to clipboard operation
phpstan-drupal copied to clipboard

Return type extension for CacheBackendInterface::get

Open mglaman opened this issue 4 years ago • 0 comments

The get method returns object|false and the object always has a data property.

The cache object should have the following properties:

  • data
  • created
  • tags
  • valid
  • expire
  • checksum
  • serialized

See

  • \Drupal\Core\Cache\MemoryBackend::prepareItem
  • \Drupal\Core\Cache\ApcuBackend::prepareItem
  • \Drupal\Core\Cache\DatabaseBackend::prepareItem

mglaman avatar Dec 03 '21 18:12 mglaman