Showing 14 of 29 total issues
Function utilService
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var utilService = function() {
var utils = {};
/**
Function controller
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ($scope, $moment, helpService, yadaApi, modalService, localStorage, errorService, authService) {
$scope.obStep = 1;
$scope.minDate = $moment().toDate();
$scope.initDate = $moment('20160201', 'YYYYMMDD').toDate();
Function routeResolver
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var routeResolver = function() {
this.$get = function() {
return this;
};
Function googleCalendarService
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var googleCalendarService = function(Utils, $rootScope) {
var CLIENT_ID = '240339457257-tqhtiqq9irs42ite1tmp1gjii23hg3uo.apps.googleusercontent.com';
var SCOPES = ['https://www.googleapis.com/auth/calendar'];
var calendarId;
Function apiService
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var apiService = function($http, constants, $q, authService) {
var yadaAPI = {};
yadaAPI.reminders = {};
var apiRoute = constants.HOSTNAME + constants.API_ROUTE;
Function route
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.route = (function(routeConfig) {
var resolve = function(url, baseName, path, controllerAs, secure) {
if (!path) {
path = '';
Function iCalService
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var iCalService = function(SaveAs) {
var iCalFactory = function() {
// Ideally if the browser is MSIE < 10 the iCal save button shouldn't be shown
if (navigator.userAgent.indexOf('MSIE') > -1 &&
navigator.userAgent.indexOf('MSIE 10') === -1) {
Function showModal
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
modalFactory.showModal = function(content, options) {
options = options || {};
var defaultController = function($scope, $modalInstance, contentItem) {
Function addCalendarEvents
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addCalendarEvents(events, school, dueDate, callback) {
// authorizes YadaGuru with user's Google account
gapi.auth.authorize({
'client_id': CLIENT_ID,
'scope': SCOPES,
Function resolve
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var resolve = function(url, baseName, path, controllerAs, secure) {
if (!path) {
path = '';
}
Function groupBy
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
utils.groupBy = function(arrayOfObjects, propToGroupBy) {
var groupArray = [],
match;
var newGroup = function(initObj, groupProp) {
Function controller
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function ($scope, $moment, helpService, yadaApi, modalService, localStorage, errorService, authService) {
Avoid deeply nested control flow statements. Open
Open
if (groupArray[j].name === arrayOfObjects[i][propToGroupBy]) {
groupArray[j].members.push(arrayOfObjects[i]);
match = true;
break;
}
Function resolve
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var resolve = function(url, baseName, path, controllerAs, secure) {