<commit_before>"use strict";

const inquirer = require("inquirer");
const os = require("os");

const Service = require("../../service_base");

const versions = ["7.1", "7.0" , "5.6" ];

/**
 * @Service {
 *  @id "php",
 *  @group "engine",
 *  @label "PHP",
 * }
 */
module.exports = class PhpService extends Service {

  /**
   * @inheritdoc
   */
  static defineConfiguration() {
    return {
      version: {
        label: "Version",
        default: "7.1",
      },
      xdebug: {
        label: "XDebug enabled",
        default: true,
      },
      additional_extensions: {
        label: "Additional PHP extensions",
        default: ["opcache"],
      },
      ini_settings: {
        label: "Custom INI settings",
        default: [],
      },
    };
  }

  /**
   * @inheritdoc
   */
  _configure() {
    let choices = [];
    versions.forEach((version) => {
      choices.push({
        name: version,
        checked: version === this.config.version,
      });
    });

    return inquirer.prompt([{
      type: "list",
      name: "version",
      message: "PHP version:",
      choices: choices,
    }, {
      type: "confirm",
      name: "xdebug",
      message: "Enabled xDebug?",
      default: true,
    }]).then((values) => {
      this.config.version = values.version;<commit_msg>Fixes default ini settings value not object. See #96.<commit_after>"use strict";

const inquirer = require("inquirer");
const os = require("os");

const Service = require("../../service_base");

const versions = ["7.1", "7.0" , "5.6" ];

/**
 * @Service {
 *  @id "php",
 *  @group "engine",
 *  @label "PHP",
 * }
 */
module.exports = class PhpService extends Service {

  /**
   * @inheritdoc
   */
  static defineConfiguration() {
    return {
      version: {
        label: "Version",
        default: "7.1",
      },
      xdebug: {
        label: "XDebug enabled",
        default: true,
      },
      additional_extensions: {
        label: "Additional PHP extensions",
        default: ["opcache"],
      },
      ini_settings: {
        label: "Custom INI settings",
        default: {},
      },
    };
  }

  /**
   * @inheritdoc
   */
  _configure() {
    let choices = [];
    versions.forEach((version) => {
      choices.push({
        name: version,
        checked: version === this.config.version,
      });
    });

    return inquirer.prompt([{
      type: "list",
      name: "version",
      message: "PHP version:",
      choices: choices,
    }, {
      type: "confirm",
      name: "xdebug",
      message: "Enabled xDebug?",
      default: true,
    }]).then((values) => {
      this.config.version = values.version;
{'fraction_non_alphanumeric': 0.17258308157099697, 'fraction_numerical': 0.006797583081570997, 'mean_word_length': 2.055363321799308, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '394914', 'n_tokens_mistral': 832, 'n_tokens_neox': 814, 'n_words': 187}