Archive
Software Resiliency
-
Use of ‘return’ statement is not recommended
[vc_row][vc_column][vc_btn title=”SOFTWARE RESILIENCY” style=”flat” color=”black” i_icon_fontawesome=”fa fa-shield” add_icon=”true” link=”url:http%3A%2F%2Fdoc.casthighlight.com%2Fsoftware-resiliency%2F|||”][vc_btn title=”BEST PRACTICES” style=”outline” color=”black” i_icon_fontawesome=”fa fa-code” add_icon=”true” link=”url:http%3A%2F%2Fdoc.casthighlight.com%2Fcategory%2Fproduct%2Findicators-methodology%2Fcode-insights%2Fsoftware-resiliency%2Fbest-practices%2F|||”][vc_empty_space height=”12px”][vc_row_inner][vc_column_inner][vc_column_text] Why you should care [/vc_column_text][vc_column_text]Specifically in…
-
Do not compare to null
[vc_row][vc_column][vc_btn title=”SOFTWARE RESILIENCY” style=”flat” color=”black” i_icon_fontawesome=”fa fa-shield” add_icon=”true” link=”url:http%3A%2F%2Fdoc.casthighlight.com%2Fsoftware-resiliency%2F|||”][vc_btn title=”BEST PRACTICES” style=”outline” color=”black” i_icon_fontawesome=”fa fa-code” add_icon=”true” link=”url:http%3A%2F%2Fdoc.casthighlight.com%2Fcategory%2Fproduct%2Findicators-methodology%2Fcode-insights%2Fsoftware-resiliency%2Fbest-practices%2F|||”][vc_empty_space height=”12px”][vc_row_inner][vc_column_inner][vc_column_text] Why you should care [/vc_column_text][vc_column_text]Whenever null…
-
phpinfo() should not be used in production
For security purpose, developers should not leave phpinfo() in production code, as it displays information which can be used to compromise the server that…
-
The code contains too many PHP4 deprecated constructor naming.
Developers should avoid using deprecated constructors. Since PHP5, constructor should be named __construct.
-
The code contains too many final artifacts in final classes
Unnecessary final modifiers inside final classes should be avoided. Final modifier prevents child classes from overriding a method by prefixing the definition with final.…
-
The code contains too many classes that declare __get() without declaring __set()
When __get() are declared, __set() shoud be declared as well.
-
Force casts should not be used
Because force casting (as!) does not perform any type safety validations, it is capable of performing dangerous conversions between unrelated types. When the types…
-
Avoid abstract classes without abstract or concrete methods
Abstract classes can have public constructors, and this is required in some particular cases. But a public constructor means that the class can be…
-
Variables should be declared with ‘let’ or ‘const’
The distinction between the variable types created by var and by let is significant, and a switch to let will help alleviate many of…
-
Multiline string literals should not be used
Continuing a string across a linebreak is supported in most script engines, but it is not a part of ECMAScript. Additionally, the whitespace at…