clean-code-dotnet icon indicating copy to clipboard operation
clean-code-dotnet copied to clipboard

ShowList funtion in DRY section does not return a list

Open mdgr3301 opened this issue 2 years ago • 1 comments

ShowList funtion should return an object of List<EmployeeData>, currently does not return anything

public List<EmployeeData> ShowList(Employee employees) { foreach (var employee in employees) { var expectedSalary = employees.CalculateExpectedSalary(); var experience = employees.GetExperience(); var githubLink = employees.GetGithubLink(); var data = new[] { expectedSalary, experience, githubLink };

    render(data);
}

}

mdgr3301 avatar Apr 11 '22 20:04 mdgr3301

currently does not return anything

All examples do not return a result and should not return. So, error in samples signatures - need change from List to void.

dmitryvhf avatar Apr 12 '22 16:04 dmitryvhf