protected function getBooleanSnippet(array $fields, $requestVariable = '$this')
    {
        $code = '';

        foreach ($fields as $field) {
            if ($field->isBoolean() && $field->isCheckbox()) {
                $code .= sprintf("        \$data['%s'] = %s->has('%s');", $field->name, $requestVariable, $field->name) . PHP_EOL;
            }
        }

        return $code;
    }