Conditions | 12 |
Paths | 1536 |
Total Lines | 56 |
Code Lines | 28 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
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:
If many parameters/temporary variables are present:
1 | <?php |
||
43 | public function execute() |
||
44 | { |
||
45 | $conf = []; |
||
46 | |||
47 | if (!isset($conf['client']['html']['catalog']['detail']['url']['config']['absoluteUri'])) { |
||
48 | $conf['client']['html']['catalog']['detail']['url']['config']['absoluteUri'] = 1; |
||
49 | } |
||
50 | |||
51 | if (!isset($conf['client']['html']['account']['download']['url']['config']['absoluteUri'])) { |
||
52 | $conf['client']['html']['account']['download']['url']['config']['absoluteUri'] = 1; |
||
53 | } |
||
54 | |||
55 | if ($this->{$this->fieldSenderFrom} != '') { |
||
56 | $conf['resource']['email']['from-name'] = $this->{$this->fieldSenderFrom}; |
||
57 | } |
||
58 | |||
59 | if ($this->{$this->fieldSenderEmail} != '') { |
||
60 | $conf['resource']['email']['from-email'] = $this->{$this->fieldSenderEmail}; |
||
61 | } |
||
62 | |||
63 | if ($this->{$this->fieldReplyEmail} != '') { |
||
64 | $conf['resource']['email']['reply-email'] = $this->{$this->fieldReplyEmail}; |
||
65 | } |
||
66 | |||
67 | if ($this->{$this->fieldPageCatalog} != '') { |
||
68 | $conf['client']['html']['catalog']['lists']['url']['target'] = $this->{$this->fieldPageCatalog}; |
||
69 | } |
||
70 | |||
71 | if ($this->{$this->fieldPageDetail} != '') { |
||
72 | $conf['client']['html']['catalog']['detail']['url']['target'] = $this->{$this->fieldPageDetail}; |
||
73 | } |
||
74 | |||
75 | if ($this->{$this->fieldPageDownload} != '') { |
||
76 | $conf['client']['html']['account']['download']['url']['target'] = $this->{$this->fieldPageDownload}; |
||
77 | } |
||
78 | |||
79 | if ($this->{$this->fieldPageLogin} != '') { |
||
80 | $conf['client']['html']['account']['index']['url']['target'] = $this->{$this->fieldPageLogin}; |
||
81 | } |
||
82 | |||
83 | if ($this->{$this->fieldTemplateBaseurl} != '') { |
||
84 | $themeDir = $this->{$this->fieldTemplateBaseurl}; |
||
85 | |||
86 | if ($themeDir[0] !== '/') { |
||
87 | $themeDir = realpath(\TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/' . $themeDir); |
||
88 | } |
||
89 | |||
90 | $conf['resource']['fs-theme']['basedir'] = $themeDir; |
||
91 | } |
||
92 | |||
93 | $tsconf = Base::parseTS($this->{$this->fieldTSconfig}); |
||
94 | $jobs = (array) $this->{$this->fieldController}; |
||
95 | |||
96 | Scheduler\Base::execute($tsconf, $conf, $jobs, $this->{$this->fieldSite}, $this->{$this->fieldPageDetail}); |
||
97 | |||
98 | return true; |
||
99 | } |
||
101 |