TemplavoilaPi1   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 40
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A renderElement_preProcessLanguageKey() 0 6 4
A renderElement_preProcessValueKey() 0 6 4
1
<?php
2
3
namespace AOE\Languagevisibility\Hooks;
4
5
/***************************************************************
6
 * Copyright notice
7
 *
8
 * (c) 2016 AOE GmbH <[email protected]>
9
 * All rights reserved
10
 *
11
 * This script is part of the TYPO3 project. The TYPO3 project is
12
 * free software; you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation; either version 2 of the License, or
15
 * (at your option) any later version.
16
 *
17
 * The GNU General Public License can be found at
18
 * http://www.gnu.org/copyleft/gpl.html.
19
 *
20
 * This script is distributed in the hope that it will be useful,
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 * GNU General Public License for more details.
24
 *
25
 * This copyright notice MUST APPEAR in all copies of the script!
26
 ***************************************************************/
27
/**
28
 *
29
 * @author	Daniel Pötzinger <[email protected]>
30
 * @author	Tolleiv Nietsch <[email protected]>
31
 */
32
33
class TemplavoilaPi1 {
34
35
	/**
36
	 * Modify languagekey to enable proper fallsbacks etc...
37
	 *
38
	 * @param array $row
39
	 * @param string $table
40
	 * @param string $lKey
41
	 * @param $langDisabled
42
	 * @param boolean $langChildren
43
	 * @param object $object
44
	 * @internal param bool $langDisable
45
	 * @return string
46
	 */
47
	public function renderElement_preProcessLanguageKey($row, $table, $lKey, $langDisabled, $langChildren, &$object) {
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $object is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
48
		if ($row['_OVERLAYLANGUAGEISOCODE'] && ! $langDisabled && ! $langChildren) {
49
			$lKey = 'l' . $row['_OVERLAYLANGUAGEISOCODE'];
50
		}
51
		return $lKey;
52
	}
53
54
	/**
55
	 * Modify valuekey to enable proper fallback etc...
56
	 *
57
	 * @param array $row
58
	 * @param string $table
59
	 * @param string $vKey
60
	 * @param $langDisabled
61
	 * @param boolean $langChildren
62
	 * @param object $object
63
	 * @internal param bool $langDisable
64
	 * @return string
65
	 */
66
	public function renderElement_preProcessValueKey($row, $table, $vKey, $langDisabled, $langChildren, &$object) {
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $object is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
67
		if ($row['_OVERLAYLANGUAGEISOCODE'] && ! $langDisabled && $langChildren) {
68
			$vKey = 'v' . $row['_OVERLAYLANGUAGEISOCODE'];
69
		}
70
		return $vKey;
71
	}
72
}
73