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

<?php tag MUST be followed by a blank line #861

Closed
wants to merge 1 commit into from
Closed

<?php tag MUST be followed by a blank line #861

wants to merge 1 commit into from

Conversation

gmponos
Copy link
Contributor

@gmponos gmponos commented Jan 10, 2017

In my opinion I believe that this new PSR should stricly declare if the <?php tag MUST or MUST NOT be followed by a blank line.

@gmponos
Copy link
Contributor Author

gmponos commented Jan 10, 2017

Hmm... I just found out this MR. I made this change based on the example following the line I have changed which has a blank line after the tag. The other examples that do not have a File-level docblock do not seem to have a blank line.

So how is this decided? Should this be on the judgement of each developer if he will leave a blank line or not?

@samdark
Copy link
Member

samdark commented Jan 10, 2017

Currently it's on the judgment of each developer.

@gmponos
Copy link
Contributor Author

gmponos commented Jan 11, 2017

So what are your thoughts about it? Should be left as is or force a blank/not blank line rule?

@samdark
Copy link
Member

samdark commented Jan 11, 2017

There are cases where opinions were contradicting each other:

<?php

namespace my\soft;

class X
{
}

and

<?php
declare(strict_types=1);

or even

<?php declare(strict_types=1);

That's why that was left out for now.

@gmponos gmponos changed the title <?php tag should be followed by a blank line <?php tag MUST be followed by a blank line Jan 11, 2017
@michaelcullum
Copy link
Member

@php-fig/psr-12

@michaelcullum
Copy link
Member

It does.

@gmponos
Copy link
Contributor Author

gmponos commented Feb 18, 2017

It does.

What does?

@michaelcullum
Copy link
Member

[PSR-12] should strictly declare if the <?php tag MUST or MUST NOT be followed by a blank line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants