Showing 33 of 383 total issues
Function renderLoginPage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderLoginPage: function() {
if(this.state.loaded && this.state.responseData.success === "1"){
AsyncStorage.setItem(STORAGE_KEY, this.state.sid).done();
return this.userPage();
}
Function userPage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
userPage: function(){
//FIX THIS LOGIN
//USE NAVIGATOR
var prev = this.props.route;
console.log("this route: " + this.props.route);
Method updateOtherUser
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
@ApiOperation("Update other user")
@POST
@Timed
@Consumes(MediaType.APPLICATION_JSON)
@Path("/UpdateOtherUser")
Function changeUserInfo
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function changeUserInfo(){
if (isset($_SESSION['username']) && isset($_POST['oldPwd']) && isset($_POST['newPwd']) && isset($_POST['authy']) &&
isset($_POST['card']) && isset($_POST['email']) && isset($_POST['name']) && isset($_POST['confNewPass']) ){
$username = $_SESSION['username'];
$oldPassword = mysql_real_escape_string($_POST['oldPwd']);
- 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
Method registerUser
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
int registerUser(@Bind("name") String name, @Bind("username") String username, @Bind("password") String password,
@Bind("email") String email, @Bind("authyId") long authyId, @Bind("cardId") String cardId,
@Bind("isAdmin") boolean isAdmin);
Method updateCurrentUser
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
int updateCurrentUser(@Bind("name") String name, @Bind("email") String email, @Bind("authyId") long authyId,
@Bind("cardId") String cardId, @Bind("isAdmin") boolean isAdmin, @Bind("username") String username,
@Bind("password") String password);
Method equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DoorlockUserLoginCheck that = (DoorlockUserLoginCheck) o;
- 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
Method equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
LoginRequest that = (LoginRequest) o;
- 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
Consider simplifying this complex logical expression. Open
if (isset($_POST['personName']) && isset($_POST['username'])&& isset($_POST['password']) && isset($_POST['email']) && isAdmin() && isset($_POST['admin'])){
$personName = $_POST['personName'];
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
Consider simplifying this complex logical expression. Open
if(username && password && name && isValidEmail && (!authyID || this.validateAuthyID(authyID))){
$.ajax({
url: common.API_URL + common.REGISTER_USER,
type: "POST",
contentType: "application/json",
Method equals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ResetPasswordRequest that = (ResetPasswordRequest) o;
- 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 forgotPassword
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function forgotPassword(){
if(isset($_GET['resetToken']) && isset($_POST['pass']) && isset($_POST['confirmPass']) ){
$resetToken = $_GET['resetToken'];
$pass = $_POST['pass'];
$otherPass = $_POST['confirmPass'];
- 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
Method equals
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
LoginStatus that = (LoginStatus) o;
- 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"