includes/class.llms.person.handler.php
Method get_login_fields
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function get_login_fields( $layout = 'columns' ) {
$usernames = LLMS_Forms::instance()->are_usernames_enabled();
/**
Method get_lost_password_fields
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function get_lost_password_fields() {
$usernames = LLMS_Forms::instance()->are_usernames_enabled();
if ( ! $usernames ) {
Method get_password_fields
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function get_password_fields() {
$fields = array();
$fields[] = array(
Method get_password_reset_fields
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function get_password_reset_fields( $key = '', $login = '' ) {
$fields = array();
foreach ( array( 'checkout', 'registration' ) as $location ) {
$fields = self::find_password_fields( $location );
Function find_password_fields
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
protected static function find_password_fields( $location ) {
$forms = LLMS_Forms::instance();
$all = $forms->get_form_fields( $location );
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function validate_login_fields
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
protected static function validate_login_fields( $data ) {
$err = new WP_Error();
$fields = self::get_login_fields();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"