src/Traits/Stash/StorageTrait.php
private function sanitizeStashStorageItem($item, $key)
    {
        if ( is_object($item) && ! ( $item instanceof \JsonSerializable ) ) {
            throw new StashException(
                'Can not stash value of key `'.$key.'`, provided object does not implement JsonSerializable'
            );
        }

        return $item;
    }
private function sanitizeStashStorageItem($item, $key)
    {
        if ( is_object($item) && ! ( $item instanceof \JsonSerializable ) ) {
            throw new StashException(
                'Can not stash value of key `'.$key.'`, provided object does not implement JsonSerializable'
            );
        }

        return $item;
    }
private function sanitizeStashStorageItem ( $ item , $ key ) { if ( is_object ( $ item ) && ! ( $ item instanceof \ JsonSerializable ) ) { throw new StashException ( 'Can not stash value of key `' . $ key . '`, provided object does not implement JsonSerializable' ) ; } return $ item ; }
value sanitizer for stash items.

@param $item
@param $key
@return mixed
@throws StashException
value sanitizer for stash items .