sebdesign / laravel-state-machine

Winzou State Machine service provider for Laravel
MIT License
327 stars 57 forks source link

Allow arrays in metadata #33

Closed divanoli closed 4 years ago

divanoli commented 4 years ago

If we store arrays in metadata, the debug command throws ‘array to string conversion’ error. I’m not sure whether to print the array data as well and how many levels to traverse if we were to print the arrays. So this PR will display simple ‘Array’ as value. Also right now it prints ‘1’ for boolean true and nothing for boolean false since ‘%s’ is used in sprintf. So i’m manually casting it to string. Please feel free to edit the PR code as you see fit.

Thank you.