diff options
| author | Harsh Shandilya <msfjarvis@gmail.com> | 2019-10-02 18:04:18 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-02 18:04:18 +0530 |
| commit | f1f59dc1ed26c2351dc31e55902ff8e4b5a6ed0e (patch) | |
| tree | 2afb98c921714ccefcd22f35a7340584d1bfba53 /app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt | |
| parent | 9a1a54a6fcfa6fd6cf142f2af9804375255d14cf (diff) | |
| download | HardenedPass-f1f59dc1ed26c2351dc31e55902ff8e4b5a6ed0e.tar.gz HardenedPass-f1f59dc1ed26c2351dc31e55902ff8e4b5a6ed0e.zip | |
Add Spotless to regulate codestyle (#550)
* Add Spotless to regulate codestyle
* treewide: Run spotless
* Add spotlessCheck to CI test
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt b/app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt index 98e9bfe4..f4477681 100644 --- a/app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt +++ b/app/src/main/java/com/zeapo/pwdstore/pwgen/Phonemes.kt @@ -56,7 +56,7 @@ internal object Phonemes { /** * Generates a human-readable password. * - * @param size length of password to generate + * @param size length of password to generate * @param pwFlags flag field where set bits indicate conditions the * generated password must meet * <table summary="bits of flag field"> @@ -105,8 +105,8 @@ internal object Phonemes { continue } // Don't allow VOWEL followed a Vowel/Dipthong pair - if (prev and VOWEL > 0 && flags and VOWEL > 0 - && flags and DIPTHONG > 0 + if (prev and VOWEL > 0 && flags and VOWEL > 0 && + flags and DIPTHONG > 0 ) { continue } @@ -200,8 +200,8 @@ internal object Phonemes { shouldBe = if (shouldBe == CONSONANT) { VOWEL } else { - if (prev and VOWEL > 0 || flags and DIPTHONG > 0 - || RandomNumberGenerator.number(10) > 3 + if (prev and VOWEL > 0 || flags and DIPTHONG > 0 || + RandomNumberGenerator.number(10) > 3 ) { CONSONANT } else { |
