src/KeyStore.php
public function count($user)
    {
        if (!is_string($user)) {
            throw new \InvalidArgumentException();
        }

        if (!isset($this->keys[$user])) {
            return 0;
        }

        return count($this->keys[$user]);
    }
public function count($user)
    {
        if (!is_string($user)) {
            throw new \InvalidArgumentException();
        }

        if (!isset($this->keys[$user])) {
            return 0;
        }

        return count($this->keys[$user]);
    }
public function count ( $ user ) { if ( ! is_string ( $ user ) ) { throw new \ InvalidArgumentException ( ) ; } if ( ! isset ( $ this -> keys [ $ user ] ) ) { return 0 ; } return count ( $ this -> keys [ $ user ] ) ; }
Return the number of keys currently registered
for the given user.

\param string $user
User whose keys must be counted.

\retval int
Number of available keys for the given user.
Return the number of keys currently registered for the given user .