Skip to content

Commit 99aa1d7

Browse files
changed Checkstyle
1 parent e96987c commit 99aa1d7

File tree

6 files changed

+16
-14
lines changed

6 files changed

+16
-14
lines changed

src/main/java/telegram/bot/AppApplication.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
@SpringBootApplication
77
public class AppApplication {
88

9-
public static void main(String[] args) {
10-
SpringApplication.run(AppApplication.class, args);
11-
}
9+
public static void main(String[] args) {
10+
SpringApplication.run(AppApplication.class, args);
11+
}
1212

1313
}

src/main/java/telegram/bot/exception/GitHubAPIException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package telegram.bot.exception;
22

3-
public class GitHubAPIException extends RuntimeException{
3+
public class GitHubAPIException extends RuntimeException {
44
public GitHubAPIException(String message) {
55
super(message);
66
}

src/main/java/telegram/bot/message/StatisticMessage.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,19 @@ public String getMessage(String message) {
2323
var fullName = markdownV2Util.escapeMarkdownV2(basicProfileStatistic.getUser().getFullname());
2424

2525
return """
26+
👤
2627
***Profile:*** [%s](%s)
2728
***FullName:*** %s
2829
***Email:*** %s
2930
***Created at:*** %s
30-
31+
📊
3132
***Public Repositories:*** %d
3233
***Commits:*** %d
3334
***Forks:*** %d
3435
***Issues:*** %d
3536
***Pull Requests:*** %d
3637
***Code Reviews:*** %d
37-
38+
3839
***Followers:*** %d
3940
***Following:*** %d
4041
***Stars:*** %d

src/main/java/telegram/bot/services/GitHubService.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@
2424
@Service
2525
@AllArgsConstructor
2626
public class GitHubService {
27+
private static final int TIMEOUT = 10;
2728
private final WebClient gitHubWebClientConfig;
2829
private final ContributeStatisticService contributeService;
2930
private final GraphQlReader graphQlReader;
3031
private final BasicStatisticService basicStatisticService;
3132

32-
private final int TIMEOUT = 10;
33-
3433
public Mono<BasicStatistic> fetchBasicStatistic(String username) {
3534
var query = graphQlReader.reading("basicStatistic");
3635

@@ -87,11 +86,11 @@ private Mono<String> fetchCreatedAt(String username) {
8786
private Mono<ContributeStatistic> fetchContributionsForYear(String username, int year) {
8887
var query = graphQlReader.reading("contributionsStatistic");
8988
var from = ZonedDateTime
90-
.of(year,1,1,0,0,0,0, ZoneOffset.UTC)
89+
.of(year, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC)
9190
.toInstant()
9291
.toString();
9392
var to = ZonedDateTime
94-
.of(year,12,31,23,59,59,999_999_999, ZoneOffset.UTC)
93+
.of(year, 12, 31, 23, 59, 59, 999_999_999, ZoneOffset.UTC)
9594
.toInstant()
9695
.toString();
9796

src/main/java/telegram/bot/services/UpdateService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
import telegram.bot.util.MarkdownV2Util;
1515

1616
import static telegram.bot.enums.CommandName.START;
17-
import static telegram.bot.enums.Message.*;
17+
import static telegram.bot.enums.Message.EXCEPTION;
18+
import static telegram.bot.enums.Message.NOT_COMMAND;
19+
import static telegram.bot.enums.Message.START_MESSAGE;
1820

1921

2022
@Component

src/main/java/telegram/bot/util/NormalizeUsername.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
@Component
99
public class NormalizeUsername {
10-
public String normalized (String username) {
10+
public String normalized(String username) {
1111
if (username == null || username.isBlank()) {
1212
return "";
1313
}
1414

15-
if(username.startsWith("@")) {
15+
if (username.startsWith("@")) {
1616
return username.substring(1);
1717
}
1818

@@ -21,7 +21,7 @@ public String normalized (String username) {
2121
var uri = new URI(username);
2222
var path = uri.getPath();
2323

24-
if(path != null && path.length() > 1) {
24+
if (path != null && path.length() > 1) {
2525
var segments = path.split("/");
2626
return segments[1];
2727
}

0 commit comments

Comments
 (0)