mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
phpstan, eslint and code style fixes
This commit is contained in:
parent
9e21553a7c
commit
b0b7d178ea
|
|
@ -1,4 +1,6 @@
|
||||||
import { Account } from './Account.js';
|
/**
|
||||||
|
* @typedef {import('./Account.js').Account} Account
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account Manager.
|
* Account Manager.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
import { Account } from '../Account/Account.js';
|
|
||||||
import { Request } from '../Message/Request/Request.js';
|
import { Request } from '../Message/Request/Request.js';
|
||||||
import { RequestMethod } from '../Message/Request/RequestMethod.js';
|
import { RequestMethod } from '../Message/Request/RequestMethod.js';
|
||||||
import { RequestType } from '../Message/Request/RequestType.js';
|
import { RequestType } from '../Message/Request/RequestType.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {import('../Account/Account.js').Account} Account
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Auth class.
|
* Auth class.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
export class CacheManager
|
export class CacheManager
|
||||||
{
|
{
|
||||||
constructor ()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,6 @@
|
||||||
*/
|
*/
|
||||||
export class LocalStorage
|
export class LocalStorage
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @constructor
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
constructor ()
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is local storage available?
|
* Is local storage available?
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
export class StorageManager
|
export class StorageManager
|
||||||
{
|
{
|
||||||
constructor ()
|
|
||||||
{
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
import { NotificationMessage } from '../NotificationMessage.js';
|
/**
|
||||||
|
* @typedef {import('../NotificationMessage.js').NotificationMessage} NotificationMessage
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* App notification.
|
* App notification.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
import { NotificationMessage } from '../NotificationMessage.js';
|
/**
|
||||||
|
* @typedef {import('../NotificationMessage.js').NotificationMessage} NotificationMessage
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Browser notification.
|
* Browser notification.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
import { Request } from '../Request/Request.js';
|
/**
|
||||||
|
* @typedef {import('../Request/Request.js').Request} Request
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Response manager class.
|
* Response manager class.
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,6 @@
|
||||||
*/
|
*/
|
||||||
export class ModuleFactory
|
export class ModuleFactory
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @constructor
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
constructor ()
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get module instance.
|
* Get module instance.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
jsOMS.Client.prototype.connect = function () {
|
jsOMS.Client.prototype.connect = function () {
|
||||||
var self = this;
|
const self = this;
|
||||||
this.connection = new WebSocket(this.ip, this.protocol);
|
this.connection = new WebSocket(this.ip, this.protocol);
|
||||||
|
|
||||||
this.connection.onmessage = function (event) {
|
this.connection.onmessage = function (event) {
|
||||||
var msg = JSON.parse(event.data);
|
const msg = JSON.parse(event.data);
|
||||||
|
|
||||||
self.messages[msg.type](msg);
|
self.messages[msg.type](msg);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
import { Request } from '../../Message/Request/Request.js';
|
import { Request } from '../../Message/Request/Request.js';
|
||||||
import { EventManager } from '../../Event/EventManager.js';
|
|
||||||
|
/**
|
||||||
|
* @typedef {import('../../Event/EventManager.js').EventManager} EventManager
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Advanced input class.
|
* Advanced input class.
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,9 @@ export class Tab
|
||||||
}
|
}
|
||||||
|
|
||||||
const fragments = fragmentString.split('&');
|
const fragments = fragmentString.split('&');
|
||||||
const index = fragments.indexOf(this.getElementsByTagName('label')[0].getAttribute('for'));
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
const index = fragments.indexOf(this.getElementsByTagName('label')[0].getAttribute('for'));
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
fragments.splice(index, 1);
|
fragments.splice(index, 1);
|
||||||
} */
|
} */
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { Request } from '../Message/Request/Request.js';
|
import { Request } from '../Message/Request/Request.js';
|
||||||
import { RequestMethod } from '../Message/Request/RequestMethod.js';
|
import { RequestMethod } from '../Message/Request/RequestMethod.js';
|
||||||
import { RequestType } from '../Message/Request/RequestType.js';
|
import { RequestType } from '../Message/Request/RequestType.js';
|
||||||
import { Response } from '../Message/Response/Response.js';
|
|
||||||
import { GeneralUI } from './GeneralUI.js';
|
import { GeneralUI } from './GeneralUI.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -306,11 +306,11 @@
|
||||||
*/
|
*/
|
||||||
jsOMS.watcher = (function ()
|
jsOMS.watcher = (function ()
|
||||||
{
|
{
|
||||||
var timer = 0;
|
let watcherTimer = 0;
|
||||||
return function (callback, ms)
|
return function (callback, ms)
|
||||||
{
|
{
|
||||||
clearTimeout(timer);
|
clearTimeout(watcherTimer);
|
||||||
timer = setTimeout(callback, ms);
|
watcherTimer = setTimeout(callback, ms);
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user