NHSLeadership / nightingale-2-0

A WordPress theme for the NHS using the NHS.UK frontend library
Other
28 stars 15 forks source link

Omit Closing Tag from Page.php Template #588

Closed SavPhill closed 1 year ago

SavPhill commented 1 year ago

Describe the bug The page.php template includes a closing tag at the end of the file. This is not required, and it is suggested that the closing tag be omitted from php files to remove unwanted whitespace. This is also consistent with the other templates, whereby the closing tag ?> has been omitted at the end of the file.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'page.php template'
  2. View the closing tag at the end of the file ?>

Expected behavior It should be omitted like the other templates.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here. Coding standard references supporting this change:

https://www.php-fig.org/psr/psr-2/ https://www.php.net/manual/en/language.basic-syntax.instruction-separation.php#:~:text=Note%3A,headers%20to%20the%20response%20later.

I have added a PR to fix: https://github.com/NHSLeadership/nightingale-2-0/pull/587