Code Duplication    Length = 12-12 lines in 2 locations

src/Chamilo/PageBundle/Entity/User.php 1 location

@@ 2008-2019 (lines=12) @@
2005
        return in_array(strtoupper($role), $this->getRoles(), true);
2006
    }
2007
2008
    public function isAccountNonExpired()
2009
    {
2010
        if (true === $this->expired) {
2011
            return false;
2012
        }
2013
2014
        if (null !== $this->expiresAt && $this->expiresAt->getTimestamp() < time()) {
2015
            return false;
2016
        }
2017
2018
        return true;
2019
    }
2020
2021
    public function isAccountNonLocked()
2022
    {

src/Chamilo/UserBundle/Entity/User.php 1 location

@@ 2126-2137 (lines=12) @@
2123
        return in_array(strtoupper($role), $this->getRoles(), true);
2124
    }
2125
2126
    public function isAccountNonExpired()
2127
    {
2128
        if (true === $this->expired) {
2129
            return false;
2130
        }
2131
2132
        if (null !== $this->expiresAt && $this->expiresAt->getTimestamp() < time()) {
2133
            return false;
2134
        }
2135
2136
        return true;
2137
    }
2138
2139
    public function isAccountNonLocked()
2140
    {