{"comment":{"url":"https://api.github.com/repos/AlparSzabados/Scrap/comments/14257150","html_url":"https://github.com/AlparSzabados/Scrap/commit/78674a8aba0d562125147634e9dd2003b279119d#commitcomment-14257150","id":14257150,"user":{"login":"paplorinc","id":1841944,"avatar_url":"https://avatars.githubusercontent.com/u/1841944?v=3","gravatar_id":"","url":"https://api.github.com/users/paplorinc","html_url":"https://github.com/paplorinc","followers_url":"https://api.github.com/users/paplorinc/followers","following_url":"https://api.github.com/users/paplorinc/following{/other_user}","gists_url":"https://api.github.com/users/paplorinc/gists{/gist_id}","starred_url":"https://api.github.com/users/paplorinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paplorinc/subscriptions","organizations_url":"https://api.github.com/users/paplorinc/orgs","repos_url":"https://api.github.com/users/paplorinc/repos","events_url":"https://api.github.com/users/paplorinc/events{/privacy}","received_events_url":"https://api.github.com/users/paplorinc/received_events","type":"User","site_admin":false},"position":9,"line":12,"path":"BMR Calculator","commit_id":"78674a8aba0d562125147634e9dd2003b279119d","created_at":"2015-11-07T08:28:07Z","updated_at":"2015-11-07T08:28:07Z","body":"`maleNumber` is ambiguous, just rename it to `offset`\r\n\r\nalso, try to extract the common pars from male and female and to the actual calculations outside, i.e.\r\n\r\n```Groovy\r\n// before the switch, to define the variables\r\ndef (offset, weightScale, heightScale, ageScale)\r\n\r\n// inside the switch, for both cases\r\n(offset, weightScale, heightScale, ageScale) = [88.362, 13.397, 4.799, 5.677]\r\n//similarly for the `WOMAN` case\r\n\r\n// and at the end use these values in general:\r\noffset + weightScale * weight + heightScale * height + ageScale * age\r\n```"}}