rspec/rules/S1757/php/rule.adoc

42 lines
687 B
Plaintext
Raw Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
Coding conventions allow teams to collaborate effectively. For maximum standardization and readability, PHP code should use the long ``++<?php ?>++`` tags or the short-echo ``++<?= ?>++`` tags; it should not use the other tag variations.
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,php]
2021-04-28 16:49:39 +02:00
----
<?
$foo = 1;
?>
----
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,php]
2021-04-28 16:49:39 +02:00
----
<?php
$foo = 1;
?>
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::highlighting.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]