Clean the config params from unnecessary params no to make the notification too heavy.

@return array
1703
private function cleanConfigParams()
    {
        /**
         * Add the params you want to be removed from the push notification
         */
        $paramsToBeRemoved = ['apiKey'];

        return array_filter($this->config, function ($key) use ($paramsToBeRemoved) {
            return !in_array($key, $paramsToBeRemoved);
        }, ARRAY_FILTER_USE_KEY);
    }
515055
protected function canonicalizeHeaders()
    {
        $canonical = array();
        $headers = array();
        if (isset($this->config['headers'])) {
            $headers = array_map('strtolower', array_keys($this->config['headers']));
            if (count($this->config['headers']) > 0) {
                $headers = array_combine(
                    $headers,
                    array_values($this->config['headers'])
                );
            }
        }

        foreach ($this->headers_to_sign as $key) {
            $key = strtolower($key);
            if (isset($headers[$key])) {
                if (is_array($headers[$key]) && count($headers[$key]) >= 1) {
                    $value = trim($headers[$key][0]);
                } elseif (is_array($headers[$key]) && count($headers[$key]) === 0) {
                    continue;
                } else {
                    $value = trim($headers[$key]);
                }

                if (!empty($value)) {
                    $canonical[$key] = preg_replace('/\s+/', ' ', $value);
                }
            }
        }

        ksort($canonical);
        $serialized_header = '';
        foreach ($canonical as $key => $value) {
            $serialized_header .= $key . ':' . $value . "\t";
        }

        return rtrim($serialized_header);
    }
568474
protected function cleanParameters( array $parameters )
    {
        foreach ($parameters as $parameter => $value) {
            if (is_int( $parameter )) {
                unset( $parameters[$parameter] );
            }
        }
        return $parameters;
    }
909695
public function getParams(): array
    {
        $params = [
            'chat_id' => $this->chatId,
            'phone_number' => $this->phoneNumber,
            'first_name' => $this->firstName,
        ];

        if ($this->lastName) {
            $params['last_name'] = $this->lastName;
        }

        if ($this->disableNotification !== null) {
            $params['disable_notification'] = (int)$this->disableNotification;
        }

        if ($this->replyToMessageId) {
            $params['reply_to_message_id'] = $this->replyToMessageId;
        }

        return $params;
    }
395202
protected function cleanParams(array $params)
    {
        $values = [];
        foreach ($params as $name => $details) {
            $this->cleanValueFrom($name, $details['value'], $values);
        }

        return $values;
    }
486706
public function clear()
    {
        $this->id = null;
        $this->type = null;
        $this->name = null;
        $this->domain = null;
        $this->api_url = null;
        $this->api_auth_http_user = null;
        $this->api_auth_http_password = null;
        $this->api_auth_type = null;
        $this->api_auth_user = null;
        $this->api_auth_password = null;
        $this->api_auth_token = null;
        $this->api_auth_url_user_key = null;
        $this->api_auth_url_pw_key = null;
        $this->cron = null;
        $this->customer_id = null;
        $this->activated = null;
        $this->notes = null;
        $this->last_run = null;
        $this->includelog = null;
        $this->public_key = null;
        $this->website_hash = null;
        $this->notification_recipient = null;
        $this->notification_sender = null;
        $this->notification_change = null;
        $this->notification_error = null;
        $this->alreadyInSave = false;
        $this->alreadyInValidation = false;
        $this->alreadyInClearAllReferencesDeep = false;
        $this->clearAllReferences();
        $this->applyDefaultValues();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
882931
protected function clear()
    {
        $this->scheme       = null;
        $this->host         = null;
        $this->port         = null;
        $this->user         = null;
        $this->pass         = null;
        $this->pathSegments = [];
        $this->parameters   = [];
        $this->fragment     = null;
        $this->orignalValue = $this->returnValue  = '';
        return $this->parse();
    }
1087944
protected function cleanupParameters()
    {
        $parser = new Parser();
        $params = $this->getParameters();
        foreach ($params as $key => $value) {
            if (is_string($value)) {
                $params[$key] = $parser->parse($value);
            }
        }
        $this->setParameters($params);
    }
993660
public function cleanConfig()
    {
        // Revert config that was changed.
        foreach ($this->config as $name => $key_value) {
            foreach ($key_value as $key => $value) {
                $this->getDriver()->configSet($name, $key, $value);
            }
        }
        $this->config = array();
    }
1336470
public function resetParameters()
    {
        // Reset parameter data
        $this->paramsGet     = array();
        $this->paramsPost    = array();
        $this->files         = array();
        $this->raw_post_data = null;

        // Clear outdated headers
        if (isset($this->headers['content-type'])) { unset($this->headers['content-type']);
        }
        if (isset($this->headers['content-length'])) { unset($this->headers['content-length']);
        }

        return $this;
    }
1026182
public function actionClearAll()
    {
        $caches = $this->findCaches();
        $cachesInfo = [];

        if (empty($caches)) {
            $this->notifyNoCachesFound();
            return ExitCode::OK;
        }

        foreach ($caches as $name => $class) {
            $cachesInfo[] = [
                'name' => $name,
                'class' => $class,
                'is_flushed' => $this->canBeCleared($class) ? $this->app->get($name)->clear() : false,
            ];
        }

        $this->notifyCleared($cachesInfo);
    }
1012316
public function clean()
    {
        try {
            $result = [
                'result'        => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->clear() : FALSE,
                'commit'        => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->commit() : NULL,
                'getDriverName' => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->getDriverName() : NULL,
                'getStats'      => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->getStats() : NULL,
                'getConfig'     => isset($this->cacheInstance) && is_object($this->cacheInstance) ? $this->cacheInstance->getConfig() : NULL,
            ];
            $this->debug->debug(__FUNCTION__, 'Clear Cache from Handler: ' . json_encode($this->cacheHandle) . ' -> Result: ' . json_encode($result));

            return $result;
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return $message;
        }
    }
964383
private function getParametersWithoutNamespace()
    {
        $parameters = array();
        foreach ($this->parameters as $key => $value) {
            if (strpos($key, ':') === false) {
                $parameters[$key] = $value;
            }
        }
        return $parameters;
    }
218883
def clean(self, config=True, catalog=False, check=False):
        

        try:
            if (config):
                os.unlink(self.config['FILTER_NAME'])
                os.unlink(self.config['PARAMETERS_NAME'])
                os.unlink(self.config['STARNNW_NAME'])
                os.unlink(self.config['CONFIG_FILE'])
            if (catalog):
                os.unlink(self.config['CATALOG_NAME'])
            if (check):
                os.unlink(self.config['CHECKIMAGE_NAME'])

        except OSError:
            pass
935819
public function getParams(): array
    {
        $params = [
            'chat_id' => $this->chatId,
            'voice' => $this->voice,
        ];

        $params = array_merge($params, $this->buildJsonAttributes([
            'duration' => $this->duration,
            'disable_notification' => $this->disableNotification,
            'reply_to_message_id' => $this->replyToMessageId
        ]));

        return $params;
    }
1199150
private function cleanPost()
    {
        $this->post = $_POST;
        // Sanitize global data
        if (is_array($_POST)) {
            foreach ($_POST as $key => $value) {
                $_POST[$this->cleanKeys($key)] = $this->sanitize($value);
            }
        } else {
            $_POST = [];
        }

        return $_POST;
    }
835268
public function rules()
    {

        $allowed_registration = implode(',', Seat::$options['registration']);
        $allowed_cleanup = implode(',', Seat::$options['cleanup_data']);
        $allowed_tracking = implode(',', Seat::$options['allow_tracking']);

        return [
            'registration'   => 'required|in:' . $allowed_registration,
            'cleanup_data'   => 'required|in:' . $allowed_cleanup,
            'admin_contact'  => 'required|email',
            'allow_tracking' => 'required|in:' . $allowed_tracking,
        ];
    }