Skip to content

Commit

Permalink
Clean up ConfigTester after decaffeinate
Browse files Browse the repository at this point in the history
References #460
  • Loading branch information
Gert-dev committed May 19, 2019
1 parent d6fbfe2 commit 313d2c7
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions lib/ConfigTester.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
let ConfigTester;
const child_process = require('child_process');
'use strict';

module.exports =

//#*
// Tests the user's PHP setup to see if it is properly usable.
//#
(ConfigTester = class ConfigTester {
/**
* Tests the user's PHP setup to see if it is properly usable.
*/
class ConfigTester
{
/**
* Constructor.
*
Expand All @@ -25,15 +20,17 @@ module.exports =
* @return {Promise}
*/
test() {
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
const process = this.phpInvoker.invoke(['-v']);
return process.on('close', code => {

process.on('close', (code) => {
if (code === 0) {
resolve(true);
return;
}

return resolve(false);
resolve(false);
});
});
}
});
};

0 comments on commit 313d2c7

Please sign in to comment.