Completed
Push — nrc-comm-architecture ( 50fffb )
by
unknown
19:11
created

start.php ➔ init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 12
nc 1
nop 0
dl 0
loc 19
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/*
3
 * Recommendations interface library
4
 * Author: National Research Council Canada
5
 * Website: http://www.nrc-cnrc.gc.ca/eng/rd/ict/
6
 *
7
 * License: Creative Commons Attribution 3.0 Unported License
8
 * Copyright: Her Majesty the Queen in Right of Canada, 2018
9
 */
10
?>
11
<?php
12
namespace NRC_RECOMMENDATIONS;
13
14
elgg_register_event_handler('init', 'system', 'NRC_RECOMMENDATIONS\init');
15
16
function init() {
17
18
  elgg_define_js('react', [
19
    'src' => '/mod/nrc_recommendations/node_modules/react/umd/react.development.js',
20
  ]);
21
  elgg_define_js('react-dom', [
22
    'src' => '/mod/nrc_recommendations/node_modules/react-dom/umd/react-dom.development.js',
23
  ]);
24
  elgg_define_js('refimpl', [
25
    'src' => '/mod/nrc_recommendations/lib/index.js',
26
    'deps' => array('react', 'react-dom', 'jsrsasign'),
27
    'exports' => 'refimpl.default',
28
  ]);
29
30
  elgg_register_css('nrc_component', '/mod/nrc_recommendations/lib/static/css/main.756f64b7.css');
31
  elgg_load_css('nrc_component');
32
33
  elgg_require_js('main');
34
}
35
36
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
37