GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ImportJSService   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 4
c 3
b 0
f 0
lcom 0
cbo 0
dl 0
loc 28
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getConttentsJS() 0 11 3
1
<?php
2
3
namespace App\Http\Services\Root;
4
5
/**
6
 * ImportJSService
7
 *
8
 * 読み込むJSファイルを管理するサービス
9
 */
10
class ImportJSService
11
{
12
    /**
13
     * Create a new docs controller instance.
14
     */
15
    public function __construct()
16
    {
17
    }
18
19
    /**
20
     * Contentsで用いるJS取得を行う
21
     * 
22
     * @param $requestParams リクエストパラメータ
23
     *
24
     * @return array Contentsで用いるるJSの宣言
25
     */
26
    public function getConttentsJS($requestParams)
27
    {
28
        $importJS = '';
29
        // $requestParamsにcontent=connpassが含まれる時
30
        if(strpos($requestParams, 'contents=connpass') === 0) {
31
            $importJS .= '<script type="text/javascript" src="/js/contents/connpass/components/connpass.js"></script>';
32
        } elseif (strpos($requestParams, 'contents=suggester') === 0) {
33
            $importJS .= '<script type="text/javascript" src="/js/contents/suggester/suggester.js"></script>';
34
        }
35
        return $importJS;
36
    }
37
}
38