streetcomplete / sc-photo-service

Photo upload service for StreetComplete
MIT License
16 stars 5 forks source link

Refactor to PSR-1 and change config to a class with constants #3

Closed r15ch13 closed 6 years ago

r15ch13 commented 6 years ago

This time it's mostly style changes and changes to config.php :smile:

westnordost commented 6 years ago

removed ?> and end of file

But according to PSR-1:

PHP code MUST use the long <?php ?> tags or the short-echo <?= ?> tags; it MUST NOT use the other tag variations.

r15ch13 commented 6 years ago

Oh, that's actually from PSR-2.

westnordost commented 6 years ago

Oh, that's actually from PSR-2.

Okay, weird. So the coding styles do not actually expand on each other.

r15ch13 commented 6 years ago

Oh, that's actually from PSR-2.

Okay, weird. So the coding styles do not actually expand on each other, as it is claimed.

I think this is mainly for excluding the ASP Tags <%= and %>. ?> is still used for inline code:

Date: <?php date(); ?> an so on.
r15ch13 commented 6 years ago

I don't intend to open the pandora's box of a discussion about whitespaces, the placement of curly braces or function names.

Here are some code examples of widely used PHP projects: PHPUnit, for unit testing: Assert.php Guzzle, an HTTP client: Client.php Symfony, framework: Application.php Laravel, framework: Model.php

You're the project owner, you decide. :smile:

exploide commented 6 years ago

Ok fine then :stuck_out_tongue:

Thank you, I'll merge now. The project looks a bit prettier now. Especially the configuration is much better this way :tada: