These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
0 ignored issues
–
show
|
|||
2 | |||
3 | /** |
||
4 | * DO NOT EDIT! |
||
5 | * |
||
6 | * The following default settings are to be used by the extension itself, |
||
7 | * please modify settings in the LocalSettings file. |
||
8 | * |
||
9 | * @codeCoverageIgnore |
||
10 | */ |
||
11 | if ( !defined( 'MEDIAWIKI' ) ) { |
||
12 | die( 'This file is part of the SemanticCite extension, it is not a valid entry point.' ); |
||
13 | } |
||
14 | |||
15 | // In-text citation reference format options |
||
16 | define( 'SCI_CITEREF_NUM', 1 ); |
||
17 | define( 'SCI_CITEREF_KEY', 2 ); |
||
18 | |||
19 | /** |
||
20 | * Specifies the caption format of the citation reference, either as a number |
||
21 | * or as the annotated key |
||
22 | */ |
||
23 | $GLOBALS['scigCitationReferenceCaptionFormat'] = SCI_CITEREF_NUM; |
||
24 | |||
25 | /** |
||
26 | * Enables a tooltip for a specific citation reference format |
||
27 | * |
||
28 | * The requestCacheTTL specifies the expiry for a citation text that is locally |
||
29 | * cached in a browser before a new ajax-request is made. |
||
30 | * |
||
31 | * To force a browser to renew the display before the cache is expired, delete |
||
32 | * the "scite.cache" localStorage from the browser |
||
33 | */ |
||
34 | $GLOBALS['scigShowTooltipForCitationReference'] = [ |
||
35 | SCI_CITEREF_NUM, |
||
36 | SCI_CITEREF_KEY |
||
37 | ]; |
||
38 | |||
39 | $GLOBALS['scigTooltipRequestCacheTTLInSeconds'] = 60 * 60 * 24; // false to disable the Cache |
||
40 | |||
41 | /** |
||
42 | * Setting to regulate the caching of response for received from a metadata |
||
43 | * provider |
||
44 | */ |
||
45 | $GLOBALS['scigMetadataResponseCacheType'] = CACHE_ANYTHING; |
||
46 | $GLOBALS['scigMetadataResponseCacheLifetime'] = 60 * 60 * 24; |
||
47 | |||
48 | /** |
||
49 | * Number of columns displayed for the reference list |
||
50 | */ |
||
51 | $GLOBALS['scigNumberOfReferenceListColumns'] = 0; // 0 = responsive columns |
||
52 | |||
53 | /** |
||
54 | * Responsive columns depend on a browser to select an appropriated number of |
||
55 | * columns based on the screen width, yet it is possible to limit the responsiveness |
||
56 | * to a mono list when the character length of the produced reference list is |
||
57 | * lower than that for the given setting. |
||
58 | */ |
||
59 | $GLOBALS['scigResponsiveMonoColumnCharacterBoundLength'] = 600; |
||
60 | |||
61 | /** |
||
62 | * Specifies the reference list type of which can be either 'ol' or 'ul' |
||
63 | */ |
||
64 | $GLOBALS['scigReferenceListType'] = 'ol'; |
||
65 | |||
66 | /** |
||
67 | * Whether to generate a "Browse" link to a citation resource or not. |
||
68 | */ |
||
69 | $GLOBALS['scigBrowseLinkToCitationResource'] = true; |
||
70 | |||
71 | /** |
||
72 | * Specify which cache type to be used, if no cache should be used at all, |
||
73 | * use CACHE_NONE |
||
74 | */ |
||
75 | $GLOBALS['scigReferenceListCacheType'] = CACHE_ANYTHING; |
||
76 | |||
77 | /** |
||
78 | * Whether a strict validation on behalf of the #scite parser should be |
||
79 | * enabled or not |
||
80 | */ |
||
81 | $GLOBALS['scigEnabledStrictParserValidation'] = true; |
||
82 | |||
83 | // Deprecated setting |
||
84 | $GLOBALS['scigStrictParserValidationEnabled'] = $GLOBALS['scigEnabledStrictParserValidation']; |
||
85 | |||
86 | /** |
||
87 | * Whether an update job should be dispatched for changed citation text |
||
88 | * entities or not |
||
89 | */ |
||
90 | $GLOBALS['scigEnabledCitationTextChangeUpdateJob'] = true; |
||
91 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.