This should be `if ($key === 'deleted') {` (note the spaces)