protected function validateSyntaxEditor()
    {
        $code = $this->getSubmitted('content');

        if (empty($code) || $this->data_extension !== 'php') {
            return null;
        }

        $result = $this->editor->validatePhpCode($code);

        if (!isset($result) || $result === true) {
            return null;
        }

        $error = empty($result) ? $this->text('There is a syntax error in your file') : $result;
        $this->setError('content', $error);
    }