Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactored a little, added CI actions, dummy test #51

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

bigcat88
Copy link
Member

Most stuff was taken from picker

Test was added only one, as it is more likely a test for a test.

Linters and style checking stuff is much more useful :)

P.S: I know that commits should be separated, but this should be easy review I hope even in this bad case.

@bigcat88 bigcat88 requested a review from julien-nc as a code owner November 15, 2023 13:15
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Clean and simple.

Comment on lines 50 to 51
php-versions: ['8.2']
server-versions: ['master']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could test against all supported Php and NC:
Php >= 8.0
NC >= 26

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    php-versions: ['8.1', '8.2']
    server-versions: ['stable26', 'stable27', 'master']

I think will be enough...

Comment on lines 45 to +47
public function __construct(ITimeFactory $time,
JiraAPIService $jiraAPIService,
LoggerInterface $logger) {
JiraAPIService $jiraAPIService,
LoggerInterface $logger) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you know Php >= 8.0 will be used you could use attribute declaration in construct params. Not very important though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed missing type declarations in all files, removing them completely.

Declaring in construct params - let leave this for the next time.

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do what you want about the comment 😁

Comment on lines +35 to +40
IRequest $request,
IConfig $config,
IURLGenerator $urlGenerator,
IL10N $l,
NetworkService $networkService,
?string $userId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
IRequest $request,
IConfig $config,
IURLGenerator $urlGenerator,
IL10N $l,
NetworkService $networkService,
?string $userId) {
IRequest $request,
private IConfig $config,
private IURLGenerator $urlGenerator,
private IL10N $l,
private NetworkService $networkService,
private ?string $userId) {

(Just in case) In Php >= 8.0, if you do this you can get rid of the property declaration (before the constructor) and of the property assignment (in the constructor).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I know but I like the old style for some reason more..

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do what you want about the comment 😁

@bigcat88 bigcat88 merged commit 1d284b2 into main Nov 15, 2023
16 checks passed
@delete-merged-branch delete-merged-branch bot deleted the linters-checks-test branch November 15, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants