private function allowedCallbacks(array $callbacks, $which)
    {
        $reserved = $this->locked ? array_flip(array_keys($this->$which)) : [];

        return array_diff_key(array_filter($callbacks, 'is_callable'), $reserved);
    }