Showing 26 of 96 total issues
Function RoutesConfig
has 365 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function RoutesConfig ($stateProvider, $urlRouterProvider) {
'ngInject'
var getView = (viewName) => {
return `./views/app/pages/${viewName}/${viewName}.page.html`
File routes.config.js
has 368 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export function RoutesConfig ($stateProvider, $urlRouterProvider) {
'ngInject'
var getView = (viewName) => {
return `./views/app/pages/${viewName}/${viewName}.page.html`
Function routeBodyClass
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
function routeBodyClass ($rootScope) {
return {
scope: {ngModel: '=ngModel'},
link: function routeBodyClassLink (scope, elem) {
$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState) { // eslint-disable-line angular/on-watch
- 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 $onInit
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$onInit () {
this.lineChartLabels = ['Januarys', 'February', 'March', 'April', 'May', 'June', 'July']
this.lineChartSeries = ['Series A', 'Series B']
this.lineChartData = [
[65, 59, 80, 81, 56, 55, 40],
File reset_link.blade.php
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
File userverification.blade.php
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Method run
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run()
{
DB::table('permission_role')->insert([
[
'id' => 1,
Method putMe
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function putMe(Request $request)
{
$user = Auth::user();
$this->validate($request, [
Method run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run()
{
DB::table('roles')->insert([
[
'id' => 1,
Function RoutesRun
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function RoutesRun ($rootScope, $state, $auth, AclService, $timeout, API, ContextService) {
'ngInject'
AclService.resume()
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor ($scope, $state, $compile, DTOptionsBuilder, DTColumnBuilder, API) {
'ngInject'
this.API = API
this.$state = $state
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor ($scope, $state, $compile, DTOptionsBuilder, DTColumnBuilder, API) {
'ngInject'
this.API = API
this.$state = $state
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor ($scope, $state, $compile, DTOptionsBuilder, DTColumnBuilder, API) {
'ngInject'
this.API = API
this.$state = $state
Function constructor
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor ($stateParams, $state, API) {
'ngInject'
this.$state = $state
this.formSubmitted = false
Function passwordVerifyClass
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function passwordVerifyClass () {
return {
require: 'ngModel',
scope: {
passwordVerify: '='
Function getRolesAbilities
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
private function getRolesAbilities()
{
$abilities = [];
$roles = Role::all();
- 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 constructor
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor ($stateParams, $state, API) {
'ngInject'
this.$state = $state
this.formSubmitted = false
Method run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run()
{
DB::table('role_user')->insert([
[
'id' => 1,
Function constructor
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor (Restangular, $window) {
'ngInject'
// content negotiation
var headers = {
'Content-Type': 'application/json',
Function delete
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
delete (roleId) {
let API = this.API
let $state = this.$state
swal({