rspec/rules/S3763/php/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

49 lines
1.0 KiB
Plaintext

== Why is this an issue?
Directives in the php.ini files can be of type ``++boolean++``, ``++integer++`` or ``++string++``.
For ``++boolean++`` acceptable values are ``++0++``, ``++1++``, ``++true++``, ``++false++``, ``++yes++``, ``++no++``, ``++on++`` and ``++off++``.
For ``++integers++`` they can be qualified with ``++k++``, ``++m++`` or ``++g++``. E.g. 16k means 16000.
The complete list of directive is at \http://php.net/manual/en/ini.list.php
=== Noncompliant code example
[source,php]
----
allow_url_include = 42; Noncompliant, should be a boolean
max_execution_time = "1024"; Noncompliant, should be an integer
----
=== Compliant solution
[source,php]
----
allow_url_include = false
max_execution_time = 1024
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Change that directive to be of the proper type.
'''
== Comments And Links
(visible only on this page)
=== on 20 Oct 2016, 16:32:54 Pierre-Yves Nicolas wrote:
Looks good to me.
endif::env-github,rspecator-view[]