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.
Completed
Push — master ( 278e53...818459 )
by gyeong-won
39:17 queued 30:14
created

syndicationAdminView::dispSyndicationAdminConfig()   C

Complexity

Conditions 10
Paths 48

Size

Total Lines 56
Code Lines 30

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 10
eloc 30
nc 48
nop 0
dl 0
loc 56
rs 6.7741
c 0
b 0
f 0

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
/* Copyright (C) NAVER <http://www.navercorp.com> */
3
4
/**
5
 * @class  syndicationAdminView
6
 * @author NAVER ([email protected])
7
 * @brief  syndication admin view class
8
 **/
9
class syndicationAdminView extends syndication
10
{
11
	function init() 
12
	{
13
	}
14
15
	public function dispSyndicationAdminConfig()
16
	{
17
		$oModuleModel = getModel('module');
18
19
		$module_config = $oModuleModel->getModuleConfig('syndication');
20
21
		$oSyndicationModel = getModel('syndication');
22
		Context::set('ping_log', $oSyndicationModel->getResentPingLog());
23
24
		if(!$module_config->syndication_use)
25
		{
26
			$module_config->syndication_use = 'Y';
27
		}
28
29
		if(!$module_config->site_url)
30
		{
31
			$module_config->site_url = Context::getDefaultUrl()?Context::getDefaultUrl():getFullUrl();
32
		}
33
34
		if(!$module_config->year)
35
		{
36
			$module_config->year = date("Y");
37
		}
38
39
		if(!isset($module_config->syndication_password))
40
		{
41
			$module_config->syndication_password = uniqid();
42
		}
43
44
		Context::set('syndication_use', $module_config->syndication_use);
45
		Context::set('site_url', preg_replace('/^(http|https):\/\//i','',$module_config->site_url));
46
		Context::set('year', $module_config->year);
47
		Context::set('syndication_token', $module_config->syndication_token);
48
		Context::set('syndication_password', $module_config->syndication_password);
49
		Context::set('uri_scheme', (Context::getSslStatus() == 'always') ? 'https://' : 'http://');
50
51
		$output = executeQueryArray('syndication.getExceptModules');
52
		$except_module_list = array();
53
		if($output->data && count($output->data) > 0)
54
		{
55
			foreach($output->data as $item)
56
			{
57
				$except_module_list[] = $item;
58
			}
59
		}
60
		Context::set('except_module', $except_module_list);
61
		
62
63
		//Security
64
		$security = new Security();
65
		$security->encodeHTML('services..service','except_module..ping');
66
		$security->encodeHTML('except_module..mid','except_module..browser_title');
67
68
		$this->setTemplatePath($this->module_path.'tpl');
69
		$this->setTemplateFile('config');
70
	}
71
72
}
73