Showing 106 of 326 total issues
Avoid deeply nested control flow statements. Open
Open
if (queueTheme.Count > 0)
{
theme = queueTheme.Dequeue();
}
Method OpenDetailedStatistics
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Task OpenDetailedStatistics(string userLogin, int subjectId, int groupId,
int pageIndex, string title, string name);
Method OpenDetailedStatistics
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string userLogin, int subjectId, int groupId, int pageIndex, string title, string name) =>
Consider simplifying this complex logical expression. Open
Open
if ((Convert.ToInt32(a[0]) > Convert.ToInt32(b[0])) ||
(Convert.ToInt32(a[1]) > Convert.ToInt32(b[1]) && Convert.ToInt32(a[0]) == Convert.ToInt32(b[0])) ||
(Convert.ToInt32(a[2]) > Convert.ToInt32(b[2]) && Convert.ToInt32(a[0]) == Convert.ToInt32(b[0]) &&
Convert.ToInt32(a[1]) == Convert.ToInt32(b[1])))
{
Method calculateChartData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
List<double> calculateChartData(StatsStudentModel stats, LabsVisitingList studentsPractStatistics, LabsVisitingList studentTestStatistics, LaboratoryWorksModel currentPractStudentStatistics, LaboratoryWorksModel worksModel)
Method OpenParentalStudentsListStats
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Task OpenParentalStudentsListStats(IPlatformServices services, int pageIndex, int subjectId,
List<StatsStudentModel> students, string title);
Method OpenAddSingleMark
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public Task OpenAddSingleMark(string title, string name, LabsVisitingList Marks, TakedLabs prOrLabStat, int subGruop);
Method OpenParentalStudentsListStats
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public async Task OpenParentalStudentsListStats(IPlatformServices services,
int pageIndex, int subjectId, List<StatsStudentModel> students, string title) =>
Method OpenAddSingleMark
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public async Task OpenAddSingleMark(string title, string name, LabsVisitingList Marks, TakedLabs prOrLabStat, int sub) =>
Method saveMarks
has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring. Open
Open
private async Task saveMarks()
{
string body = "";
string link = "";
if (_title == CrossLocalization.Translate("practice_mark"))
- 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
Method getAndSetStatistics
has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring. Open
Open
protected virtual async Task getAndSetStatistics()
{
try
{
if (CurrentSubject != null)
- 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
Avoid too many return
statements within this method. Open
Open
return Task.FromResult<object>(null);
Avoid too many return
statements within this method. Open
Open
return Task.FromResult<object>(null);
Avoid too many return
statements within this method. Open
Open
return Task.FromResult<object>(null);
Avoid too many return
statements within this method. Open
Open
return StatsPageEnum.LecturesVisiting;
Avoid too many return
statements within this method. Open
Open
return Task.FromResult<object>(null);
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return Task.FromResult<object>(null);
Avoid too many return
statements within this method. Open
Open
return Task.FromResult<object>(null);
Avoid too many return
statements within this method. Open
Open
return Task.FromResult<object>(null);