Showing 36 of 38 total issues
Function NavigationController
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function NavigationController (app) {
app
.controller('NavigationController', [
'UserService',
'ClientStorageService',
Function BluebirdController
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export const BluebirdController = angular => {
angular
.module('mwl.bluebird')
.run(['$q', '$state', ($q, $state) => {
$q.onPossiblyUnhandledRejection(error => {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AccountProfileController
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AccountProfileController ($rootScope, $timeout, ClientStorageService, UserService) {
const self = this
self.user = false
self.userCopy = false
self.p = new HttpProgress()
Function RegisterRHeactorJSServices
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const RegisterRHeactorJSServices = angular => {
angular
.module('RHeactorJSServiceModule', [])
.factory('LoginService', ['$http', 'APIService', ($http, APIService) => {
return new GenericAPIService($http, APIService, JsonWebToken.$context)
Function AdminUserController
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AdminUserController ($rootScope, $timeout, $stateParams, IDService, ClientStorageService, UserService) {
const self = this
self.user = false
self.userCopy = false
self.p = new HttpProgress()
Function LoginController
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function LoginController (app) {
app
.config(['$stateProvider', ($stateProvider) => {
$stateProvider
.state('login', {
Function MarkDownToHTMLDirective
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
export const MarkDownToHTMLDirective = ($location, $sanitize, $sce) => {
return {
restrict: 'A',
link: function (scope, element, attrs) {
scope.$watch('model', function (newValue) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function link
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
link: scope => {
if (!scope.progress) {
scope.progress = new HttpProgress()
}
if (!scope.clickBindThis) scope.clickBindThis = scope
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function link
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: scope => {
scope.p = new HttpProgress()
scope.uploadFiles = (file, errFiles) => {
scope.f = file
scope.errFile = errFiles && errFiles[0]
Function PasswordChangeController
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function PasswordChangeController (app) {
app
.config(['$stateProvider', function ($stateProvider) {
$stateProvider
.state('password-change', {
Function AdminUsersController
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AdminUsersController (ClientStorageService, UserService) {
const self = this
self.paginatedList = false
self.p = new HttpProgress()
self.l = new HttpProgress()
Function AccountController
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AccountController (app) {
app
.config(['$stateProvider', ($stateProvider) => {
$stateProvider
.state('account', {
Function uploadFiles
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
scope.uploadFiles = (file, errFiles) => {
scope.f = file
scope.errFile = errFiles && errFiles[0]
if (!file) return
scope.p.activity()
Function connect
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
connect (token) {
if (this.source) {
logger.appWarning('EventSourceConnection', 'already connected!')
return this.source
}
Function connect
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
ModelEventConnection.prototype.connect = function (token) {
let self = this
if (self.source) {
logger.appWarning('ModelEventConnection', 'already connected!')
return self.source
Function controller
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
(LoginModel, LoginService, UserService, ClientStorageService, $state, $window, $stateParams, $location) => {
let vm = GenericController(
LoginModel,
{
onSubmit: data => new LoginModel(new EmailValue(data.email), data.password),
Function AdminController
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AdminController (app) {
app
.config(['$stateProvider', ($stateProvider) => {
$stateProvider
.state('admin', {
Function ActivationController
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function ActivationController (app) {
app
.config(['$stateProvider', ($stateProvider) => {
$stateProvider
.state('activation', {
Function AdminUserController
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function AdminUserController ($rootScope, $timeout, $stateParams, IDService, ClientStorageService, UserService) {
const self = this
self.user = false
self.userCopy = false
self.p = new HttpProgress()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AccountProfileController
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function AccountProfileController ($rootScope, $timeout, ClientStorageService, UserService) {
const self = this
self.user = false
self.userCopy = false
self.p = new HttpProgress()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"