diff --git a/INSTALLATION GUIDE.md b/INSTALLATION GUIDE.md
index b2f7aa9c..aa3615b4 100644
--- a/INSTALLATION GUIDE.md
+++ b/INSTALLATION GUIDE.md
@@ -181,7 +181,7 @@ Navigate to localhost/index.php to verify that localhost is able to serve your s
With all these changes done, your apache server should be able to serve web resources from your new document root. You can further go ahead and configure your DNS records to point your domains to your server's IP at this step.
Downloading and setting up Composer
------------------
+------------------------------------
Follow the instructions provided on the official [composer website](https://getcomposer.org/download/) to download and install composer package manager. Once installed, it's advisable to move the composer executable to the /usr/local/bin/ directory so that it can be easily accessed from anywhere in your terminal. To do so, use the following commands:
diff --git a/public/index.php b/public/index.php
index 1198ee4e..94219cfd 100644
--- a/public/index.php
+++ b/public/index.php
@@ -15,7 +15,7 @@ function isRunningInDocker(): bool {
}
// Only attempt to set permissions if we're NOT in Docker
- if (!isRunningInDocker()) {
+ if (! isRunningInDocker()) {
$basePath = dirname(__DIR__);
$files = [
'env' => $basePath . '/.env',
diff --git a/public/scripts/wizard.js b/public/scripts/wizard.js
index 8010d927..4bb171d6 100644
--- a/public/scripts/wizard.js
+++ b/public/scripts/wizard.js
@@ -6,7 +6,7 @@
},
error500: {
title: 'Something\'s bad happened with the server.',
- description: ' Try again by clicking the back button or launch the wizard again by refershing the webpage or clicking the cancel button.'
+ description: ' Try again by clicking the back button or launch the wizard again by refreshing the web page or clicking the cancel button.'
},
};
@@ -112,10 +112,13 @@
this.view = attributes.view;
},
getDefaultAttributes: function () {
- // function to fetch current saved prefixes and will update values of defaults
+ // Function to fetch current saved prefixes and will update values of defaults
return new Promise ((resolve, reject) => {
$.get('./wizard/xhr/website-configure', (response) => {
- if (typeof response.status != 'undefined' && true === response.status) {
+ if (
+ typeof response.status != 'undefined'
+ && true === response.status
+ ) {
this.defaults['member_panel_url'] = response.memberPrefix;
this.defaults['customer_panel_url'] = response.knowledgebasePrefix;
resolve();
@@ -130,7 +133,7 @@
},
isProcedureCompleted: function (callback) {
this.set('urlCollection', {
- 'member-prefix': this.view.$el.find('input[name="memeberUrlPrefix"]').val(),
+ 'member-prefix': this.view.$el.find('input[name="memberUrlPrefix"]').val(),
'customer-prefix': this.view.$el.find('input[name="customerUrlPrefix"]').val(),
});
@@ -181,15 +184,21 @@
event.preventDefault();
this.$el.find('.form-content .wizard-form-notice').remove();
- let memberPrefix = this.$el.find('input[name="memeberUrlPrefix"]').val();
+ let memberPrefix = this.$el.find('input[name="memberUrlPrefix"]').val();
let customerPrefix = this.$el.find('input[name="customerUrlPrefix"]').val();
- if (memberPrefix == null || memberPrefix =="") {
+ if (
+ memberPrefix == null
+ || memberPrefix == ""
+ ) {
errorFlag = true;
- this.$el.find('.form-content input[name="memeberUrlPrefix"]').after("This field is mandatory")
+ this.$el.find('.form-content input[name="memberUrlPrefix"]').after("This field is mandatory")
}
- if (customerPrefix == null || customerPrefix =="") {
+ if (
+ customerPrefix == null
+ || customerPrefix == ""
+ ) {
errorFlag = true;
this.$el.find('.form-content input[name="customerUrlPrefix"]').after("This field is mandatory")
}
@@ -199,15 +208,15 @@
this.$el.find('.form-content input[name="customerUrlPrefix"]').after("Both prefixes can not be same.")
}
- if (!errorFlag) {
+ if (! errorFlag) {
let prefixTestRegex = /^[a-z0-9A-Z]*$/;
- if (!prefixTestRegex.test(memberPrefix)) {
+ if (! prefixTestRegex.test(memberPrefix)) {
errorFlag = true;
- this.$el.find('.form-content input[name="memeberUrlPrefix"]').after("Only letters and numbers are allowed")
+ this.$el.find('.form-content input[name="memberUrlPrefix"]').after("Only letters and numbers are allowed")
}
- if (!prefixTestRegex.test(customerPrefix)) {
+ if (! prefixTestRegex.test(customerPrefix)) {
errorFlag = true;
this.$el.find('.form-content input[name="customerUrlPrefix"]').after("Only letters and numbers are allowed")
}
@@ -250,7 +259,10 @@
wizard.reference_nodes.content.find('#wizardCTA-IterateInstallation').prepend('' + wizard.wizard_icons_loader_template() + '');
$.post('./wizard/xhr/intermediary/super-user', this.get('user'), function (response) {
- if (typeof response.status != 'undefined' && true === response.status) {
+ if (
+ typeof response.status != 'undefined'
+ && true === response.status
+ ) {
callback(this.view);
} else {
wizard.disableNextStep();
@@ -301,41 +313,66 @@
enteredField = event.target.name;
enteredValue = event.target.value;
- if (enteredValue == null || enteredValue == "") {
+ if (
+ enteredValue == null
+ || enteredValue == ""
+ ) {
errorFlag = true;
selectedElement.find('.wizard-form-notice')
selectedElement.append("This field is mandatory");
}
- if (!errorFlag && user.name) {
- if (!nameRegex.test(user.name)) {
+ if (
+ ! errorFlag
+ && user.name
+ ) {
+ if (! nameRegex.test(user.name)) {
errorFlag = true;
this.$el.find('input[name="name"]').parent().append("Invalid Name")
}
}
- if (!errorFlag && user.email !== "") {
- if (!emailRegex.test(user.email)) {
+ if (
+ ! errorFlag
+ && user.email !== ""
+ ) {
+ if (! emailRegex.test(user.email)) {
errorFlag = true;
this.$el.find('input[name="email"]').parent().append("Invalid Email")
}
}
- if (user.password.length > 0 && (!passwordRegix.test(user.password))) {
- errorFlag = true;
- this.$el.find('input[name="password"]').parent().append("Password must contain minimum 8 character length, at least two letters (not case sensitive), one number, one special character(space is not allowed).")
+ if (
+ user.password.length > 0
+ && (! passwordRegix.test(user.password))
+ ) {
+ errorFlag = true;
+ this.$el.find('input[name="password"]').parent().append("Password must contain minimum 8 character length, at least two letters (not case sensitive), one number, one special character(space is not allowed).")
}
- if (user.confirmPassword.length > 0 && user.confirmPassword != user.password) {
+ if (
+ user.confirmPassword.length > 0
+ && user.confirmPassword != user.password
+ ) {
errorFlag = true;
this.$el.find('input[name="confirm_password"]').parent().append("Password does not match.")
}
- if (!errorFlag && (user.name == null || user.name =="") || (user.email == null || user.email =="") || (user.password == null || user.password =="") || (user.confirmPassword == null || user.confirmPassword ==""))
+ if (
+ ! errorFlag
+ && (user.name == null
+ || user.name == "")
+ || (user.email == null
+ || user.email =="")
+ || (user.password == null
+ || user.password =="")
+ || (user.confirmPassword == null
+ || user.confirmPassword == "")
+ ) {
errorFlag = true;
-
-
- if (!errorFlag) {
+ }
+
+ if (! errorFlag) {
this.wizard.enableNextStep();
if (event.keyCode == 13) {
@@ -345,7 +382,6 @@
} else {
this.wizard.disableNextStep();
}
-
}, 400),
});
@@ -631,16 +667,16 @@
} else if (this.get('php-configfiles-permission').hasOwnProperty('configfiles')) {
let configfiles = this.get('php-configfiles-permission').configfiles;
- let isconfigfilesError;
+ let isConfigFilesError;
configfiles.forEach(configfiles => {
let currentconfigfileName = Object.keys(configfiles)[0];
if (!configfiles[currentconfigfileName]) {
- isconfigfilesError = true;
+ isConfigFilesError = true;
this.set('verified', false);
}
});
- if (!isconfigfilesError) {
+ if (! isConfigFilesError) {
this.set('verified', true);
}
} else if (this.get('php-extensions').hasOwnProperty('extensions')) {
@@ -655,7 +691,7 @@
}
});
- if (!isExtensionError) {
+ if (! isExtensionError) {
this.set('verified', true);
}
} else {
@@ -1083,7 +1119,7 @@
this.renderWizard();
} else {
- if (!this.enabled) {
+ if (! this.enabled) {
this.router.navigate('welcome', { trigger: true });
} else {
this.timeline.every(function (installationStep, index) {
diff --git a/src/Console/Wizard/ConfigureHelpdesk.php b/src/Console/Wizard/ConfigureHelpdesk.php
index 390bee72..046a9e74 100644
--- a/src/Console/Wizard/ConfigureHelpdesk.php
+++ b/src/Console/Wizard/ConfigureHelpdesk.php
@@ -447,15 +447,15 @@ public static function addUserDetailsInTracker($userDetails = [])
private function refreshDatabaseConnection($host, $port, $name, $user, $password)
{
$response = [
- 'isServerAccessible' => true,
+ 'isServerAccessible' => true,
'isDatabaseAccessible' => true,
];
$entityManager = EntityManager::create([
- 'driver' => 'pdo_mysql',
- "host" => $host,
- "port" => $port,
- 'user' => $user,
+ 'driver' => 'pdo_mysql',
+ "host" => $host,
+ "port" => $port,
+ 'user' => $user,
'password' => $password,
], Setup::createAnnotationMetadataConfiguration(['src/Entity'], false));
@@ -471,7 +471,7 @@ private function refreshDatabaseConnection($host, $port, $name, $user, $password
}
}
- if (!in_array($name, $databaseConnection->getSchemaManager()->listDatabases())) {
+ if (! in_array($name, $databaseConnection->getSchemaManager()->listDatabases())) {
$response['isDatabaseAccessible'] = false;
}
@@ -492,10 +492,10 @@ private function refreshDatabaseConnection($host, $port, $name, $user, $password
private function createDatabase($host, $port, $name, $user, $password)
{
$entityManager = EntityManager::create([
- 'driver' => 'pdo_mysql',
- "host" => $host,
- "port" => $port,
- 'user' => $user,
+ 'driver' => 'pdo_mysql',
+ "host" => $host,
+ "port" => $port,
+ 'user' => $user,
'password' => $password,
], Setup::createAnnotationMetadataConfiguration(['src/Entity'], false));
@@ -509,7 +509,7 @@ private function createDatabase($host, $port, $name, $user, $password)
}
}
- if (!in_array($name, $databaseConnection->getSchemaManager()->listDatabases())) {
+ if (! in_array($name, $databaseConnection->getSchemaManager()->listDatabases())) {
try {
// Create database
$databaseConnection->getSchemaManager()->createDatabase($databaseConnection->getDatabasePlatform()->quoteSingleIdentifier($name));
@@ -592,7 +592,7 @@ private function askInteractiveQuestion($question, $default, int $indentLength =
$this->consoleOutput->write(false == $flag ? [self::MCA, self::CLL] : [self::MCA, self::CLL, self::MCA, self::CLL]);
if (empty($input) && false == $nullable && empty($default)) {
- if (!empty($default)) {
+ if (! empty($default)) {
$input = $default;
} else if (false == $nullable) {
$flag = true;
diff --git a/src/Console/Wizard/DefaultUser.php b/src/Console/Wizard/DefaultUser.php
index 2f412eec..c6fcb694 100644
--- a/src/Console/Wizard/DefaultUser.php
+++ b/src/Console/Wizard/DefaultUser.php
@@ -280,7 +280,7 @@ private function promptUserPasswordInteractively(InputInterface $input, OutputIn
$output->writeln(sprintf("