I am part shareholder in C corp. Company accrued bonus for me at y/e but didn't pay until 2018. Is this reported as 2017 or 2018 income?

I am part owner in a C Corp.  The company recorded accrued bonuses at year end 2017.  The bonus was paid in 2018.  Do I report the bonus income in 2017 since it was accrued by the company and taken as a deduction, or do I report the bonus income in 2018 - the year I received it?