Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var TransformerBase, quote, replace;

({replace, quote} = require('../helpers'));

TransformerBase = require('./base');

/*
 * Transforms strings, regexes, etc
 */
module.exports = class extends TransformerBase {
  Literal(node) {
    return this.unpackRegexpIfNeeded(node);
  }

  /*
   * Accounts for regexps that start with an equal sign or space.
   */
  unpackRegexpIfNeeded(node) {
    var m;
    if (!(node.value instanceof RegExp)) {
      return;
    }
    m = node.value.toString().match(/^\/([\s\=].*)\/([a-z]*)$/);
    if (m) {
      node = replace(node, {
        type: 'CallExpression',
        callee: {
          type: 'Identifier',
          name: 'RegExp'
        },
        arguments: [
          {
            type: 'Literal',
            value: m[1],
            raw: quote(m[1])
          }
        ]
      });
      if (m[2]) {
        node.arguments.push({
          type: 'Literal',
          value: m[2],
          raw: quote(m[2])
        });
      }
      return node;
    }
  }

};
```

Response:
{ replace, quote } = require('../helpers')
TransformerBase = require('./base')

###
# Transforms strings, regexes, etc
###

module.exports = class extends TransformerBase

  Literal: (node) ->
    @unpackRegexpIfNeeded(node)

  ###
  # Accounts for regexps that start with an equal sign or space.
  ###

  unpackRegexpIfNeeded: (node) ->
    return unless node.value instanceof RegExp
    m = node.value.toString().match(/^\/([\s\=].*)\/([a-z]*)$/)
    if m
      node = replace node,
        type: 'CallExpression'
        callee: { type: 'Identifier', name: 'RegExp' },
        arguments: [
          type: 'Literal'
          value: m[1]
          raw: quote(m[1])
        ]

      if m[2]
        node.arguments.push
          type: 'Literal'
          value: m[2]
          raw: quote(m[2])

      node


Prompt:
{ replace, quote } = require('../helpers')
TransformerBase = require('./base')

###
# Transforms strings, regexes, etc
###

module.exports = class extends TransformerBase

  Literal: (node) ->
    @unpackRegexpIfNeeded(node)

  ###
  # Accounts for regexps that start with an equal sign or space.
  ###

  unpackRegexpIfNeeded: (node) ->
    return unless node.value instanceof RegExp

Response:
m = node.value.toString().match(/^\/([\s\=].*)\/([a-z]*)$/)
    if m
      node = replace node,
        type: 'CallExpression'
        callee: { type: 'Identifier', name: 'RegExp' },
        arguments: [
          type: 'Literal'
          value: m[1]
          raw: quote(m[1])
        ]

      if m[2]
        node.arguments.push
          type: 'Literal'
          value: m[2]
          raw: quote(m[2])

      node


Response:
{ replace, quote } = require('../helpers')
TransformerBase = require('./base')

###
# Transforms strings, regexes, etc
###

module.exports =
class LiteralTransforms extends TransformerBase

  Literal: (node) ->
    @unpackRegexpIfNeeded(node)

  ###
  # Accounts for regexps that start with an equal sign or space.
  ###

  unpackRegexpIfNeeded: (node) ->
    return unless node.value instanceof RegExp
    m = node.value.toString().match(/^\/([\s\=].*)\/([a-z]*)$/)
    if m
      node = replace node,
        type: 'CallExpression'
        callee: { type: 'Identifier', name: 'RegExp' },
        arguments: [
          type: 'Literal'
          value: m[1]
          raw: quote(m[1])
        ]

      if m[2]
        node.arguments.push
          type: 'Literal'
          value: m[2]
          raw: quote(m[2])

      node


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
{ replace, quote } = require('../helpers')
TransformerBase = require('./base')

###
# Transforms strings, regexes, etc
###

module.exports =
class LiteralTransforms extends TransformerBase

  Literal: (node) ->
    @unpackRegexpIfNeeded(node)

  ###
  # Accounts for regexps that start with an equal sign or space.
  ###

  unpackRegexpIfNeeded: (node) ->
    return unless node.value instanceof RegExp
    m = node.value.toString().match(/^\/([\s\=].*)\/([a-z]*)$/)
    if m
      node = replace node,
        type: 'CallExpression'
        callee: { type: 'Identifier', name: 'RegExp' },
        arguments: [
          type: 'Literal'
          value: m[1]
          raw: quote(m[1])
        ]

      if m[2]
        node.arguments.push
          type: 'Literal'
          value: m[2]
          raw: quote(m[2])

      node
```

Response:
var LiteralTransforms, TransformerBase, quote, replace;

({replace, quote} = require('../helpers'));

TransformerBase = require('./base');

/*
 * Transforms strings, regexes, etc
 */
module.exports = LiteralTransforms = class LiteralTransforms extends TransformerBase {
  Literal(node) {
    return this.unpackRegexpIfNeeded(node);
  }

  /*
   * Accounts for regexps that start with an equal sign or space.
   */
  unpackRegexpIfNeeded(node) {
    var m;
    if (!(node.value instanceof RegExp)) {
      return;
    }
    m = node.value.toString().match(/^\/([\s\=].*)\/([a-z]*)$/);
    if (m) {
      node = replace(node, {
        type: 'CallExpression',
        callee: {
          type: 'Identifier',
          name: 'RegExp'
        },
        arguments: [
          {
            type: 'Literal',
            value: m[1],
            raw: quote(m[1])
          }
        ]
      });
      if (m[2]) {
        node.arguments.push({
          type: 'Literal',
          value: m[2],
          raw: quote(m[2])
        });
      }
      return node;
    }
  }

};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var LiteralTransforms, TransformerBase, quote, replace;

({replace, quote} = require('../helpers'));

TransformerBase = require('./base');

/*
 * Transforms strings, regexes, etc
 */
module.exports = LiteralTransforms = class LiteralTransforms extends TransformerBase {
  Literal(node) {
    return this.unpackRegexpIfNeeded(node);
  }

  /*
   * Accounts for regexps that start with an equal sign or space.
   */
  unpackRegexpIfNeeded(node) {
    var m;
    if (!(node.value instanceof RegExp)) {
      return;
    }
    m = node.value.toString().match(/^\/([\s\=].*)\/([a-z]*)$/);
    if (m) {
      node = replace(node, {
        type: 'CallExpression',
        callee: {
          type: 'Identifier',
          name: 'RegExp'
        },
        arguments: [
          {
            type: 'Literal',
            value: m[1],
            raw: quote(m[1])
          }
        ]
      });
      if (m[2]) {
        node.arguments.push({
          type: 'Literal',
          value: m[2],
          raw: quote(m[2])
        });
      }
      return node;
    }
  }

};
```

Response:
{ replace, quote } = require('../helpers')
TransformerBase = require('./base')

###
# Transforms strings, regexes, etc
###

module.exports =
class LiteralTransforms extends TransformerBase

  Literal: (node) ->
    @unpackRegexpIfNeeded(node)

  ###
  # Accounts for regexps that start with an equal sign or space.
  ###

  unpackRegexpIfNeeded: (node) ->
    return unless node.value instanceof RegExp
    m = node.value.toString().match(/^\/([\s\=].*)\/([a-z]*)$/)
    if m
      node = replace node,
        type: 'CallExpression'
        callee: { type: 'Identifier', name: 'RegExp' },
        arguments: [
          type: 'Literal'
          value: m[1]
          raw: quote(m[1])
        ]

      if m[2]
        node.arguments.push
          type: 'Literal'
          value: m[2]
          raw: quote(m[2])

      node


Prompt:
{ replace, quote } = require('../helpers')
TransformerBase = require('./base')

###
# Transforms strings, regexes, etc
###

module.exports =
class LiteralTransforms extends TransformerBase

  Literal: (node) ->
    @unpackRegexpIfNeeded(node)

  ###
  # Accounts for regexps that start with an equal sign or space.
  ###

  unpackRegexpIfNeeded: (node) ->

Response:
return unless node.value instanceof RegExp
    m = node.value.toString().match(/^\/([\s\=].*)\/([a-z]*)$/)
    if m
      node = replace node,
        type: 'CallExpression'
        callee: { type: 'Identifier', name: 'RegExp' },
        arguments: [
          type: 'Literal'
          value: m[1]
          raw: quote(m[1])
        ]

      if m[2]
        node.arguments.push
          type: 'Literal'
          value: m[2]
          raw: quote(m[2])

      node


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      optional: true
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }
  ]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      @deprecateOptionForExecutable("PHPCBF", "PHP - PHPCBF Path (phpcbf_path)", "Path")

    # Find phpcbf.phar script
    @Promise.all([


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      optional: true
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }

Response:
}
  ]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      @deprecateOptionForExecutable("PHPCBF", "PHP - PHPCBF Path (phpcbf_path)", "Path")

    # Find phpcbf.phar script
    @Promise.all([


Response:
@which(options.phpcbf_path) if options.phpcbf_path
      phpcbf.path()
      @tempFile("temp", text, ".php")
    ]).then(([customPhpcbfPath, phpcbfPath, tempFile]) =>
      # Get first valid, absolute path
      finalPhpcbfPath = if customPhpcbfPath and path.isAbsolute(customPhpcbfPath) then \
        customPhpcbfPath else phpcbfPath
      @verbose('finalPhpcbfPath', finalPhpcbfPath, phpcbfPath, customPhpcbfPath)

      isVersion3 = ((phpcbf.isInstalled and phpcbf.isVersion('3.x')) or \
        (options.phpcbf_version and phpcbf.versionSatisfies("#{options.phpcbf_version}.0.0", '3.x')))

      isPhpScript = (finalPhpcbfPath.indexOf(".phar") isnt -1) or (finalPhpcbfPath.indexOf(".php") isnt -1)
      @verbose('isPhpScript', isPhpScript)

      if isPhpScript
        php.run([
          phpcbfPath,
          "--no-patch" unless isVersion3
          "--standard=#{options.standard}" if options.standard
          tempFile
          ], {
            ignoreReturnCode: true
            onStdin: (stdin) ->
              stdin.end()
          })
          .then(=>
            @readFile(tempFile)
          )
      else
        phpcbf.run([
          "--no-patch" unless isVersion3
          "--standard=#{options.standard}" if options.standard
          tempFile = @tempFile("temp", text, ".php")
          ], {
            ignoreReturnCode: true
            onStdin: (stdin) ->
              stdin.end()
          })
          .then(=>
            @readFile(tempFile)
          )
      )


Prompt:
@which(options.phpcbf_path) if options.phpcbf_path
      phpcbf.path()
      @tempFile("temp", text, ".php")
    ]).then(([customPhpcbfPath, phpcbfPath, tempFile]) =>
      # Get first valid, absolute path
      finalPhpcbfPath = if customPhpcbfPath and path.isAbsolute(customPhpcbfPath) then \
        customPhpcbfPath else phpcbfPath
      @verbose('finalPhpcbfPath', finalPhpcbfPath, phpcbfPath, customPhpcbfPath)

      isVersion3 = ((phpcbf.isInstalled and phpcbf.isVersion('3.x')) or \
        (options.phpcbf_version and phpcbf.versionSatisfies("#{options.phpcbf_version}.0.0", '3.x')))

      isPhpScript = (finalPhpcbfPath.indexOf(".phar") isnt -1) or (finalPhpcbfPath.indexOf(".php") isnt -1)
      @verbose('isPhpScript', isPhpScript)

      if isPhpScript
        php.run([
          phpcbfPath,
          "--no-patch" unless isVersion3
          "--standard=#{options.standard}" if options.standard
          tempFile

Response:
], {
            ignoreReturnCode: true
            onStdin: (stdin) ->
              stdin.end()
          })
          .then(=>
            @readFile(tempFile)
          )
      else
        phpcbf.run([
          "--no-patch" unless isVersion3
          "--standard=#{options.standard}" if options.standard
          tempFile = @tempFile("temp", text, ".php")
          ], {
            ignoreReturnCode: true
            onStdin: (stdin) ->
              stdin.end()
          })
          .then(=>
            @readFile(tempFile)
          )
      )


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }
  ]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      @deprecateOptionForExecutable("PHPCBF", "PHP - PHPCBF Path (phpcbf_path)", "Path")

    # Find phpcbf.phar script
    @Promise.all([
      @which(options.phpcbf_path) if options.phpcbf_path


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }

Response:
]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      @deprecateOptionForExecutable("PHPCBF", "PHP - PHPCBF Path (phpcbf_path)", "Path")

    # Find phpcbf.phar script
    @Promise.all([
      @which(options.phpcbf_path) if options.phpcbf_path


Response:
phpcbf.path()
      @tempFile("temp", text, ".php")
    ]).then(([customPhpcbfPath, phpcbfPath, tempFile]) =>
      # Get first valid, absolute path
      finalPhpcbfPath = if customPhpcbfPath and path.isAbsolute(customPhpcbfPath) then \
        customPhpcbfPath else phpcbfPath
      @verbose('finalPhpcbfPath', finalPhpcbfPath, phpcbfPath, customPhpcbfPath)

      isVersion3 = ((phpcbf.isInstalled and phpcbf.isVersion('3.x')) or \
        (options.phpcbf_version and phpcbf.versionSatisfies("#{options.phpcbf_version}.0.0", '3.x')))

      isPhpScript = (finalPhpcbfPath.indexOf(".phar") isnt -1) or (finalPhpcbfPath.indexOf(".php") isnt -1)
      @verbose('isPhpScript', isPhpScript)

      if isPhpScript
        php.run([
          phpcbfPath,
          "--no-patch" unless isVersion3
          "--standard=#{options.standard}" if options.standard
          tempFile
          ], {
            ignoreReturnCode: true
            onStdin: (stdin) ->
              stdin.end()
          })
          .then(=>
            @readFile(tempFile)
          )
      else
        phpcbf.run([
          "--no-patch" unless isVersion3
          "--standard=#{options.standard}" if options.standard
          tempFile = @tempFile("temp", text, ".php")
          ], {
            ignoreReturnCode: true
            onStdin: (stdin) ->
              stdin.end()
          })
          .then(=>
            @readFile(tempFile)
          )
      )


Prompt:
phpcbf.path()
      @tempFile("temp", text, ".php")
    ]).then(([customPhpcbfPath, phpcbfPath, tempFile]) =>
      # Get first valid, absolute path
      finalPhpcbfPath = if customPhpcbfPath and path.isAbsolute(customPhpcbfPath) then \
        customPhpcbfPath else phpcbfPath
      @verbose('finalPhpcbfPath', finalPhpcbfPath, phpcbfPath, customPhpcbfPath)

      isVersion3 = ((phpcbf.isInstalled and phpcbf.isVersion('3.x')) or \
        (options.phpcbf_version and phpcbf.versionSatisfies("#{options.phpcbf_version}.0.0", '3.x')))

      isPhpScript = (finalPhpcbfPath.indexOf(".phar") isnt -1) or (finalPhpcbfPath.indexOf(".php") isnt -1)
      @verbose('isPhpScript', isPhpScript)

      if isPhpScript
        php.run([
          phpcbfPath,
          "--no-patch" unless isVersion3
          "--standard=#{options.standard}" if options.standard
          tempFile
          ], {

Response:
ignoreReturnCode: true
            onStdin: (stdin) ->
              stdin.end()
          })
          .then(=>
            @readFile(tempFile)
          )
      else
        phpcbf.run([
          "--no-patch" unless isVersion3
          "--standard=#{options.standard}" if options.standard
          tempFile = @tempFile("temp", text, ".php")
          ], {
            ignoreReturnCode: true
            onStdin: (stdin) ->
              stdin.end()
          })
          .then(=>
            @readFile(tempFile)
          )
      )


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }
  ]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      @deprecateOptionForExecutable("PHP - PHPCBF Path (phpcbf_path)", "PHPCBF", "Path")

    # Find phpcbf.phar script
    @Promise.all([
      @which(options.phpcbf_path) if options.phpcbf_path


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }

Response:
]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      @deprecateOptionForExecutable("PHP - PHPCBF Path (phpcbf_path)", "PHPCBF", "Path")

    # Find phpcbf.phar script
    @Promise.all([
      @which(options.phpcbf_path) if options.phpcbf_path


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }
  ]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      deprecationMessage = "The \"PHP - PHPCBF Path (phpcbf_path)\" configuration option has been deprecated. Please switch to using the option named \"Executables - PHPCBF - Path\" in Atom-Beautify package settings now."
      @deprecate(deprecationMessage)

    # Find phpcbf.phar script
    @Promise.all([


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (\d+\.\d+\.\d+)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }

Response:
]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      deprecationMessage = "The \"PHP - PHPCBF Path (phpcbf_path)\" configuration option has been deprecated. Please switch to using the option named \"Executables - PHPCBF - Path\" in Atom-Beautify package settings now."
      @deprecate(deprecationMessage)

    # Find phpcbf.phar script
    @Promise.all([


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (.*) \(cli\)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }
  ]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      deprecationMessage = "The \"PHP - PHPCBF Path (phpcbf_path)\" configuration option has been deprecated. Please switch to using the option named \"Executables - PHPCBF - Path\" in Atom-Beautify package settings now."
      @deprecate(deprecationMessage)

    # Find phpcbf.phar script
    @Promise.all([


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHP"
      cmd: "php"
      homepage: "http://php.net/"
      installation: "http://php.net/manual/en/install.php"
      version: {
        parse: (text) -> text.match(/PHP (.*) \(cli\)/)[1]
      }
    }
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        parse: (text) -> text.match(/version (\d+\.\d+\.\d+)/)[1]
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }

Response:
]

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    php = @exe('php')
    phpcbf = @exe('phpcbf')

    if options.phpcbf_path
      deprecationMessage = "The \"PHP - PHPCBF Path (phpcbf_path)\" configuration option has been deprecated. Please switch to using the option named \"Executables - PHPCBF - Path\" in Atom-Beautify package settings now."
      @deprecate(deprecationMessage)

    # Find phpcbf.phar script
    @Promise.all([


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        args: ['--version']
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }
  ]
  isPreInstalled: false

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        args: ['--version']
      }
      docker: {
        image: "unibeautify/phpcbf"
      }
    }
  ]
  isPreInstalled: false

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

Response:
beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path


Response:
# Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch" unless options.phpcbf_version is 3
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text, ".php")
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch" unless options.phpcbf_version is 3
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Prompt:
# Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch" unless options.phpcbf_version is 3
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text, ".php")
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(

Response:
'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch" unless options.phpcbf_version is 3
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  isPreInstalled: false

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch" unless options.phpcbf_version is 3
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text, ".php")
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  isPreInstalled: false

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')

Response:
]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch" unless options.phpcbf_version is 3
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text, ".php")
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"


Response:
}
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch" unless options.phpcbf_version is 3
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text, ".php")
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Prompt:
}
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })

Response:
)
      )
    else
      @run("phpcbf", [
        "--no-patch" unless options.phpcbf_version is 3
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text, ".php")
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        args: ['--version']
      }
    }
  ]
  isPreInstalled: false

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  executables: [
    {
      name: "PHPCBF"
      cmd: "phpcbf"
      homepage: "https://github.com/squizlabs/PHP_CodeSniffer"
      installation: "https://github.com/squizlabs/PHP_CodeSniffer#installation"
      version: {
        args: ['--version']
      }
    }
  ]
  isPreInstalled: false

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)

Response:
standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''


Response:
exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch" unless options.phpcbf_version is 3
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text, ".php")
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch" unless options.phpcbf_version is 3
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Prompt:
exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch" unless options.phpcbf_version is 3
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text, ".php")
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'

Response:
{
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch" unless options.phpcbf_version is 3
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  isPreInstalled: false

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch" unless options.phpcbf_version is 3
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text)
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  isPreInstalled: false

  options: {
    PHP:
      phpcbf_path: true
      phpcbf_version: true
      standard: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')

Response:
]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch" unless options.phpcbf_version is 3
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text)
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"


Response:
}
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch" unless options.phpcbf_version is 3
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Prompt:
}
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })

Response:
)
      )
    else
      @run("phpcbf", [
        "--no-patch" unless options.phpcbf_version is 3
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Response:
}
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch"
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Prompt:
}
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })

Response:
)
      )
    else
      @run("phpcbf", [
        "--no-patch"
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  isPreInstalled: false

  options: {
    _:
      standard: ["standard", (standard) ->
        if (standard) then \
          standard else "PEAR"
      ]
    PHP: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch"
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text)
            ], {
              ignoreReturnCode: true


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  isPreInstalled: false

  options: {
    _:
      standard: ["standard", (standard) ->
        if (standard) then \
          standard else "PEAR"
      ]
    PHP: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles)

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([

Response:
@which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch"
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text)
            ], {
              ignoreReturnCode: true


Response:
help: {
                link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch"
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Prompt:
help: {
                link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"

Response:
})
          )
      )
    else
      @run("phpcbf", [
        "--no-patch"
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  isPreInstalled: false

  options: {
    _:
      standard: ["standard", (standard) ->
        if (standard) then \
          standard else "PEAR"
      ]
    PHP: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch"
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text)
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"
  isPreInstalled: false

  options: {
    _:
      standard: ["standard", (standard) ->
        if (standard) then \
          standard else "PEAR"
      ]
    PHP: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)

Response:
_ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch"
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text)
            ], {
              ignoreReturnCode: true
              help: {
                link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->


Response:
stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch"
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Prompt:
stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )

Response:
)
    else
      @run("phpcbf", [
        "--no-patch"
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Response:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"

  options: {
    _:
      standard: ["standard", (standard) ->
        if (standard) then \
          standard else "PEAR"
      ]
    PHP: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles);

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path
        @which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch"
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text)
            ], {
              ignoreReturnCode: true
              help: {


Prompt:
module.exports = class PHPCBF extends Beautifier
  name: "PHPCBF"
  link: "http://php.net/manual/en/install.php"

  options: {
    _:
      standard: ["standard", (standard) ->
        if (standard) then \
          standard else "PEAR"
      ]
    PHP: true
  }

  beautify: (text, language, options) ->
    @debug('phpcbf', options)
    standardFiles = ['phpcs.xml', 'phpcs.xml.dist', 'phpcs.ruleset.xml', 'ruleset.xml']
    standardFile = @findFile(atom.project.getPaths()[0], standardFiles);

    options.standard = standardFile if standardFile

    isWin = @isWindows
    if isWin
      # Find phpcbf.phar script
      @Promise.all([
        @which(options.phpcbf_path) if options.phpcbf_path

Response:
@which('phpcbf')
      ]).then((paths) =>
        @debug('phpcbf paths', paths)
        _ = require 'lodash'
        path = require 'path'
        # Get first valid, absolute path
        phpcbfPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
        @verbose('phpcbfPath', phpcbfPath)
        @debug('phpcbfPath', phpcbfPath, paths)
        # Check if phpcbf path was found
        if phpcbfPath?
          # Found phpcbf path

          # Check if phpcbf is an executable
          isExec = path.extname(phpcbfPath) isnt ''
          exec = if isExec then phpcbfPath else "php"

          @run(exec, [
            phpcbfPath unless isExec
            "--no-patch"
            "--standard=#{options.standard}" if options.standard
            tempFile = @tempFile("temp", text)
            ], {
              ignoreReturnCode: true
              help: {


Response:
link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })
          )
      )
    else
      @run("phpcbf", [
        "--no-patch"
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Prompt:
link: "http://php.net/manual/en/install.php"
              }
              onStdin: (stdin) ->
                stdin.end()
            })
            .then(=>
              @readFile(tempFile)
            )
        else
          @verbose('phpcbf not found!')
          # Could not find phpcbf path
          @Promise.reject(@commandNotFoundError(
            'phpcbf'
            {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
            program: "phpcbf.phar"
            pathOption: "PHPCBF Path"
            })

Response:
)
      )
    else
      @run("phpcbf", [
        "--no-patch"
        "--standard=#{options.standard}" if options.standard
        tempFile = @tempFile("temp", text)
        ], {
          ignoreReturnCode: true
          help: {
            link: "https://github.com/squizlabs/PHP_CodeSniffer"
          }
          onStdin: (stdin) ->
            stdin.end()
        })
        .then(=>
          @readFile(tempFile)
        )


Response:
Order = require('./order')
Book = require('./book')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book
    # the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone()
    flipped_order.price = 1/order.price
    results = other_book.fill_orders_with(flipped_order)
    outcome = results.pop()

    unless outcome.kind is 'order_filled'
      # put in book
      results.push book.add_order(outcome.residual_order)

    results.push outcome

    return results


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Order = require('./order')
Book = require('./book')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book
    # the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone()
    flipped_order.price = 1/order.price
    results = other_book.fill_orders_with(flipped_order)
    outcome = results.pop()

    unless outcome.kind is 'order_filled'
      # put in book
      results.push book.add_order(outcome.residual_order)

    results.push outcome

    return results
```

Response:
var Book, Market, Order;

Order = require('./order');

Book = require('./book');

module.exports = Market = class Market {
  constructor(left_currency, right_currency) {
    this.add_order = this.add_order.bind(this);
    this.left_currency = left_currency;
    this.right_currency = right_currency;
    this.left_book = new Book();
    this.right_book = new Book();
  }

  add_order(order) {
    var book, flipped_order, other_book, outcome, results;
    book = null;
    if (order.offered_currency === this.left_currency) {
      book = this.right_book;
      other_book = this.left_book;
    } else {
      book = this.left_book;
      other_book = this.right_book;
    }
    // check against other book
    // the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone();
    flipped_order.price = 1 / order.price;
    results = other_book.fill_orders_with(flipped_order);
    outcome = results.pop();
    if (outcome.kind !== 'order_filled') {
      // put in book
      results.push(book.add_order(outcome.residual_order));
    }
    results.push(outcome);
    return results;
  }

};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Book, Market, Order;

Order = require('./order');

Book = require('./book');

module.exports = Market = class Market {
  constructor(left_currency, right_currency) {
    this.add_order = this.add_order.bind(this);
    this.left_currency = left_currency;
    this.right_currency = right_currency;
    this.left_book = new Book();
    this.right_book = new Book();
  }

  add_order(order) {
    var book, flipped_order, other_book, outcome, results;
    book = null;
    if (order.offered_currency === this.left_currency) {
      book = this.right_book;
      other_book = this.left_book;
    } else {
      book = this.left_book;
      other_book = this.right_book;
    }
    // check against other book
    // the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone();
    flipped_order.price = 1 / order.price;
    results = other_book.fill_orders_with(flipped_order);
    outcome = results.pop();
    if (outcome.kind !== 'order_filled') {
      // put in book
      results.push(book.add_order(outcome.residual_order));
    }
    results.push(outcome);
    return results;
  }

};
```

Response:
Order = require('./order')
Book = require('./book')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book
    # the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone()
    flipped_order.price = 1/order.price
    results = other_book.fill_orders_with(flipped_order)
    outcome = results.pop()

    unless outcome.kind is 'order_filled'
      # put in book
      results.push book.add_order(outcome.residual_order)

    results.push outcome

    return results


Prompt:
Order = require('./order')
Book = require('./book')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book

Response:
other_book = @right_book

    # check against other book
    # the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone()
    flipped_order.price = 1/order.price
    results = other_book.fill_orders_with(flipped_order)
    outcome = results.pop()

    unless outcome.kind is 'order_filled'
      # put in book
      results.push book.add_order(outcome.residual_order)

    results.push outcome

    return results


Response:
Order = require('./order')
Book = require('./book')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book
    # the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone(true)
    results = other_book.fill_orders_with(flipped_order)
    outcome = results.pop()

    unless outcome.kind is 'order_filled'
      # put in book
      results.push book.add_order(outcome.residual_order)

    results.push outcome

    return results


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Order = require('./order')
Book = require('./book')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book
    # the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone(true)
    results = other_book.fill_orders_with(flipped_order)
    outcome = results.pop()

    unless outcome.kind is 'order_filled'
      # put in book
      results.push book.add_order(outcome.residual_order)

    results.push outcome

    return results
```

Response:
var Book, Market, Order;

Order = require('./order');

Book = require('./book');

module.exports = Market = class Market {
  constructor(left_currency, right_currency) {
    this.add_order = this.add_order.bind(this);
    this.left_currency = left_currency;
    this.right_currency = right_currency;
    this.left_book = new Book();
    this.right_book = new Book();
  }

  add_order(order) {
    var book, flipped_order, other_book, outcome, results;
    book = null;
    if (order.offered_currency === this.left_currency) {
      book = this.right_book;
      other_book = this.left_book;
    } else {
      book = this.left_book;
      other_book = this.right_book;
    }
    // check against other book
    // the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone(true);
    results = other_book.fill_orders_with(flipped_order);
    outcome = results.pop();
    if (outcome.kind !== 'order_filled') {
      // put in book
      results.push(book.add_order(outcome.residual_order));
    }
    results.push(outcome);
    return results;
  }

};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Book, Market, Order;

Order = require('./order');

Book = require('./book');

module.exports = Market = class Market {
  constructor(left_currency, right_currency) {
    this.add_order = this.add_order.bind(this);
    this.left_currency = left_currency;
    this.right_currency = right_currency;
    this.left_book = new Book();
    this.right_book = new Book();
  }

  add_order(order) {
    var book, flipped_order, other_book, outcome, results;
    book = null;
    if (order.offered_currency === this.left_currency) {
      book = this.right_book;
      other_book = this.left_book;
    } else {
      book = this.left_book;
      other_book = this.right_book;
    }
    // check against other book
    // the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone(true);
    results = other_book.fill_orders_with(flipped_order);
    outcome = results.pop();
    if (outcome.kind !== 'order_filled') {
      // put in book
      results.push(book.add_order(outcome.residual_order));
    }
    results.push(outcome);
    return results;
  }

};
```

Response:
Order = require('./order')
Book = require('./book')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book
    # the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone(true)
    results = other_book.fill_orders_with(flipped_order)
    outcome = results.pop()

    unless outcome.kind is 'order_filled'
      # put in book
      results.push book.add_order(outcome.residual_order)

    results.push outcome

    return results


Prompt:
Order = require('./order')
Book = require('./book')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book

Response:
other_book = @right_book

    # check against other book
    # the .clone(true) call flips the order so that prices match the other book
    flipped_order = order.clone(true)
    results = other_book.fill_orders_with(flipped_order)
    outcome = results.pop()

    unless outcome.kind is 'order_filled'
      # put in book
      results.push book.add_order(outcome.residual_order)

    results.push outcome

    return results


Response:
Order = require('./order')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book

    result = other_book.orders_filled_by( order )

    unless result.kind == 'filled'
      # put in book
      book.add_order( result.residual_order )

    return result


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
Order = require('./order')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book

    result = other_book.orders_filled_by( order )

    unless result.kind == 'filled'
      # put in book
      book.add_order( result.residual_order )

    return result
```

Response:
var Market, Order;

Order = require('./order');

module.exports = Market = class Market {
  constructor(left_currency, right_currency) {
    this.add_order = this.add_order.bind(this);
    this.left_currency = left_currency;
    this.right_currency = right_currency;
    this.left_book = new Book();
    this.right_book = new Book();
  }

  add_order(order) {
    var book, other_book, result;
    book = null;
    if (order.offered_currency === this.left_currency) {
      book = this.right_book;
      other_book = this.left_book;
    } else {
      book = this.left_book;
      other_book = this.right_book;
    }
    // check against other book
    result = other_book.orders_filled_by(order);
    if (result.kind !== 'filled') {
      // put in book
      book.add_order(result.residual_order);
    }
    return result;
  }

};


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Market, Order;

Order = require('./order');

module.exports = Market = class Market {
  constructor(left_currency, right_currency) {
    this.add_order = this.add_order.bind(this);
    this.left_currency = left_currency;
    this.right_currency = right_currency;
    this.left_book = new Book();
    this.right_book = new Book();
  }

  add_order(order) {
    var book, other_book, result;
    book = null;
    if (order.offered_currency === this.left_currency) {
      book = this.right_book;
      other_book = this.left_book;
    } else {
      book = this.left_book;
      other_book = this.right_book;
    }
    // check against other book
    result = other_book.orders_filled_by(order);
    if (result.kind !== 'filled') {
      // put in book
      book.add_order(result.residual_order);
    }
    return result;
  }

};
```

Response:
Order = require('./order')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book

    result = other_book.orders_filled_by( order )

    unless result.kind == 'filled'
      # put in book
      book.add_order( result.residual_order )

    return result


Prompt:
Order = require('./order')

module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (order) =>
    book = null
    if order.offered_currency == @left_currency
      book = @right_book
      other_book = @left_book

Response:
else
      book = @left_book
      other_book = @right_book

    # check against other book

    result = other_book.orders_filled_by( order )

    unless result.kind == 'filled'
      # put in book
      book.add_order( result.residual_order )

    return result


Response:
module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (account, offered_currency, offered_amount, received_amount) =>
    book = null
    if offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book

    other_book.orders_filled_by( offered )

    # put in book

    @book.insert( @offered_currency )

    # we check for overlap


Prompt:
Convert this CoffeeScript to JavaScript.
```coffeescript
module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (account, offered_currency, offered_amount, received_amount) =>
    book = null
    if offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book

    other_book.orders_filled_by( offered )

    # put in book

    @book.insert( @offered_currency )

    # we check for overlap
```

Response:
var Market;

module.exports = Market = class Market {
  constructor(left_currency, right_currency) {
    this.add_order = this.add_order.bind(this);
    this.left_currency = left_currency;
    this.right_currency = right_currency;
    this.left_book = new Book();
    this.right_book = new Book();
  }

  add_order(account, offered_currency, offered_amount, received_amount) {
    var book, other_book;
    book = null;
    if (offered_currency === this.left_currency) {
      book = this.right_book;
      other_book = this.left_book;
    } else {
      book = this.left_book;
      other_book = this.right_book;
    }
    // check against other book
    other_book.orders_filled_by(offered);
    // put in book
    return this.book.insert(this.offered_currency);
  }

};

// we check for overlap


Prompt:
Convert this JavaScript to CoffeeScript.
```javascript
var Market;

module.exports = Market = class Market {
  constructor(left_currency, right_currency) {
    this.add_order = this.add_order.bind(this);
    this.left_currency = left_currency;
    this.right_currency = right_currency;
    this.left_book = new Book();
    this.right_book = new Book();
  }

  add_order(account, offered_currency, offered_amount, received_amount) {
    var book, other_book;
    book = null;
    if (offered_currency === this.left_currency) {
      book = this.right_book;
      other_book = this.left_book;
    } else {
      book = this.left_book;
      other_book = this.right_book;
    }
    // check against other book
    other_book.orders_filled_by(offered);
    // put in book
    return this.book.insert(this.offered_currency);
  }

};

// we check for overlap
```

Response:
module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (account, offered_currency, offered_amount, received_amount) =>
    book = null
    if offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else
      book = @left_book
      other_book = @right_book

    # check against other book

    other_book.orders_filled_by( offered )

    # put in book

    @book.insert( @offered_currency )

    # we check for overlap


Prompt:
module.exports = class Market
  constructor: (@left_currency, @right_currency) ->
    @left_book = new Book()
    @right_book = new Book()

  add_order: (account, offered_currency, offered_amount, received_amount) =>
    book = null
    if offered_currency == @left_currency
      book = @right_book
      other_book = @left_book
    else

Response:
book = @left_book
      other_book = @right_book

    # check against other book

    other_book.orders_filled_by( offered )

    # put in book

    @book.insert( @offered_currency )

    # we check for overlap