Skip to content

one class per file#4

Open
uehler wants to merge 3 commits intoyongfook:masterfrom
uehler:one-class-per-file
Open

one class per file#4
uehler wants to merge 3 commits intoyongfook:masterfrom
uehler:one-class-per-file

Conversation

@uehler
Copy link
Contributor

@uehler uehler commented Dec 13, 2021

in php each class has its own file

Copy link

@localheinz localheinz left a comment

Choose a reason for hiding this comment

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

👍

@localheinz
Copy link

@uehler

Can you resolve the conflicts?

@uehler uehler force-pushed the one-class-per-file branch from ac0a354 to 994df4d Compare August 24, 2023 08:34
@uehler
Copy link
Contributor Author

uehler commented Aug 24, 2023

done @localheinz

src/Api.php Outdated
Comment on lines +6 to +15
use function curl_close;
use function curl_errno;
use function curl_error;
use function curl_exec;
use function curl_getinfo;
use function curl_init;
use function curl_setopt;
use function curl_setopt_array;
use function json_decode;
use function json_encode;

Choose a reason for hiding this comment

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

Not sure about importing these functions from the root namespace - the original file does not import:

<?php
namespace Bannerbear;
class BannerbearClient

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's just micro optimizations

Choose a reason for hiding this comment

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

I know, but it's an unrelated change.

We could use friendsofphp/php-cs-fixer with the global_namespace_import fixer configured and enabled to make that change in a separate pull request.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted the imports

src/Api.php Outdated
@@ -0,0 +1,105 @@
<?php declare(strict_types=1);

Choose a reason for hiding this comment

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

@uehler

Can you also remove this declaration? The original file does not declare strict types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

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