
When an include is not surrounded by empty lines, its content is inlined on the same line as the adjacent content. That can lead to broken tags and other display issues. This PR fixes all such includes and introduces a validation step that forbids introducing the same problem again.
53 lines
982 B
Plaintext
53 lines
982 B
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,php]
|
|
----
|
|
class Foo { // Noncompliant - Foo depends on too many classes: T1, T2, T3, T4, T5, T6 and T7
|
|
/**
|
|
* @var T1
|
|
*/
|
|
public $a1; // Foo is coupled to T1
|
|
/**
|
|
* @var T2
|
|
*/
|
|
protected $a2; // Foo is coupled to T2
|
|
/**
|
|
* @var T3
|
|
*/
|
|
private $a3; // Foo is coupled to T3
|
|
|
|
/**
|
|
* @param T5
|
|
* @param T6
|
|
*
|
|
* @return T4
|
|
*/
|
|
public function compute(T5 $a, $b) { // Foo is coupled to T4, T5 and T6
|
|
$result = new T7(); // Foo is coupled to T7
|
|
return $result;
|
|
}
|
|
}
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../parameters.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|