Showing 3,213 of 3,213 total issues
Block has too many lines. [30/25] Open
namespace :cucumber do Cucumber::Rake::Task.new({:ok => 'test:prepare'}, 'Run features that should pass') do |t| t.binary = vendored_cucumber_bin # If nil, the gem's binary is used. t.fork = true # You may get faster startup if you set this to false t.profile = 'default'
- Read upRead up
- Exclude checks
NotificationsController tests '( is_employee? )' at least 5 times Open
if ( is_employee? ) @notification = Notification.new else redirect_to "/errors/error_500" end
- Read upRead up
- Exclude checks
SuspensionsController tests '( is_principal? )' at least 5 times Open
if ( is_principal? ) @@alumn = Alumn.find(params[:alumn_id]) @suspension = Suspension.new else redirect_to "/errors/error_500"
- Read upRead up
- Exclude checks
SchoolMissesController tests '( is_employee? )' at least 4 times Open
if ( is_employee? ) @school_miss = SchoolMiss.new else redirect_to "/errors/error_500" end
- Read upRead up
- Exclude checks
ParentsController tests '( is_principal? )' at least 7 times Open
if ( is_principal? ) @parent = Parent.new else redirect_to "/errors/error_500" end
- Read upRead up
- Exclude checks
StrikesController tests '( is_employee? )' at least 5 times Open
if ( is_employee? ) @@alumn = Alumn.find(params[:alumn_id]) @strike = Strike.new else redirect_to "/errors/error_500"
- Read upRead up
- Exclude checks
AlumnsController tests '( is_principal? )' at least 7 times Open
if ( is_principal? ) @shifts = Shift.all @alumn = Alumn.new @@parent = Parent.find(params[:parent_id]) @classrooms = Classroom.all.order('name_classroom')
- Read upRead up
- Exclude checks
ClassroomsController tests '( is_principal? )' at least 7 times Open
if ( is_principal? ) @classroom = Classroom.new @classroom_grades = ClassroomGrade.all @shifts = Shift.all else
- Read upRead up
- Exclude checks
PrincipalController tests '( is_principal? )' at least 3 times Open
if ( is_principal? ) @principal = Employee.find(params[:id]) end end
- Read upRead up
- Exclude checks
EmployeesController tests '( is_principal? )' at least 7 times Open
if ( is_principal? ) @user = Employee.find(params[:id]) render action: "../users/edit_password" else redirect_to "/errors/error_500"
- Read upRead up
- Exclude checks
TeachersController tests '( is_principal? )' at least 5 times Open
if ( is_principal? ) @shifts = Shift.all @teacher = Teacher.new else redirect_to "/errors/error_500"
- Read upRead up
- Exclude checks
SecretariesController tests '( is_principal? )' at least 6 times Open
if ( is_principal? ) @secretaries = Secretary.all if params[:search] string_to_search = params[:search].strip.upcase! @secretaries = Secretary.search(string_to_search).order("created_at DESC")
- Read upRead up
- Exclude checks
SubjectsController tests '( is_principal? )' at least 8 times Open
if ( is_principal? ) @classroom_grades = ClassroomGrade.all @subject = Subject.new else redirect_to "/errors/error_500"
- Read upRead up
- Exclude checks
Method give_presence_to_alumn
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def give_presence_to_alumn(date , alumn) school_misses = nil if (alumn != nil) school_misses = alumn.school_misses.all
- Read upRead up
Method destroy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def destroy if( is_principal? ) @suspension = Suspension.find(params[:id]) @alumn = Alumn.find_by_id(@suspension.alumn_id) if( @suspension.destroy )
- Read upRead up
Method destroy
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def destroy if ( is_employee? ) @strike = Strike.find(params[:id]) @alumn = Alumn.find_by_id(@strike.alumn_id) if @strike.destroy
- Read upRead up
Method add_classroom
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_classroom if ( is_principal? ) @classroom = Classroom.find(params[:id]) @subject = Subject.find(params[:subject_id]) if !((ClassroomSubject.where(classroom_id: @classroom.id).where(subject_id: @subject.id)).exists?)
- Read upRead up
Api::SuspensionsController has no descriptive comment Open
class Api::SuspensionsController < ApplicationController
- Read upRead up
- Exclude checks
ClassroomsController assumes too much for instance variable '@alumn' Open
class ClassroomsController < ApplicationController
- Read upRead up
- Exclude checks
GradesController assumes too much for instance variable '@subject' Open
class GradesController < ApplicationController
- Read upRead up
- Exclude checks