Do you think guys that configurable classes should use public properties? Why it’s bad? For me it’s not safe casting we can push to set (string) (int) whatever of course we configure this class but sometimes you can forget which type it’s use.Additionaly it’s bad OOP design. What do you think?
If you care of the proper types pushed into the class variables then using public isnt’t a good choice. In general you should use setters for that and operate on private/proteced properties. It will allow you to check, filter, etc. the data coming as the value.
Yes, i know but if we will go to the core yii2 there is a a lotof public without setter / getters. It’s making me frustrate beacuse it damage to encapsulation OOP paradigm