File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,23 @@ $arrayReader = new ArrayReader([
5151echo $arrayReader->getString('key1.key2.key3');
5252```
5353
54+ ## Better Code Quality
55+
56+ Converting complex data with simple PHP works by using a lot of type casting and ` if ` conditions etc.
57+ This leads to very high cyclomatic complexity and nesting depth, and thus poor "code rating".
58+
59+ ** Before** : Conditions: 10, Paths: 512, CRAP Score: 10
60+ <details >
61+ <summary >Click to expand!</summary >
62+ <img src =" https://user-images.githubusercontent.com/781074/109776592-096fcc80-7c03-11eb-95d4-6eef8fe982e2.png " >
63+ </details >
64+
65+ ** After** : Conditions: 1, Paths: 1, CRAP Score: 1
66+ <details >
67+ <summary >Click to expand!</summary >
68+ <img src =" https://user-images.githubusercontent.com/781074/109777526-1e992b00-7c04-11eb-8e6b-04d538661f4a.png " >
69+ </details >
70+
5471## Similar libraries
5572
5673* https://github.com/michaelpetri/typed-input
You can’t perform that action at this time.
0 commit comments