@@ -124,8 +124,9 @@ |
||
| 124 | 124 | $secondFallBackModuleDir = $secondFallBackModuleClassPath = $actualModule; |
| 125 | 125 | if ($actualModule != 'Users') { |
| 126 | 126 | $baseModule = $moduleHierarchyParts[0]; |
| 127 | - if ($baseModule == 'Settings') |
|
| 128 | - $baseModule = 'Settings:Vtiger'; |
|
| 127 | + if ($baseModule == 'Settings') { |
|
| 128 | + $baseModule = 'Settings:Vtiger'; |
|
| 129 | + } |
|
| 129 | 130 | $firstFallBackDir = str_replace(':', '.', $baseModule); |
| 130 | 131 | $firstFallBackClassPath = str_replace(':', '_', $baseModule); |
| 131 | 132 | } |
@@ -116,8 +116,9 @@ discard block |
||
| 116 | 116 | protected function prompt($msg = '', $type = self::PROMPT_ANY) |
| 117 | 117 | { |
| 118 | 118 | do { |
| 119 | - if ($msg) |
|
| 120 | - echo $msg; |
|
| 119 | + if ($msg) { |
|
| 120 | + echo $msg; |
|
| 121 | + } |
|
| 121 | 122 | $value = trim(fgets(STDIN)); |
| 122 | 123 | |
| 123 | 124 | if (!$value && $type == self::PROMPT_OPTIONAL) { |
@@ -463,8 +464,9 @@ discard block |
||
| 463 | 464 | $filename = basename($file, true); |
| 464 | 465 | $dir = substr($file, 0, strpos($file, $filename)); |
| 465 | 466 | $dir = str_replace('languages/' . self::BASE_LANG_PREFIX, 'languages/' . $languageInformation['prefix'], $dir); |
| 466 | - if (!file_exists($dir)) |
|
| 467 | - mkdir($dir); |
|
| 467 | + if (!file_exists($dir)) { |
|
| 468 | + mkdir($dir); |
|
| 469 | + } |
|
| 468 | 470 | |
| 469 | 471 | if (isset($languageInformation['prefix_value'])) { |
| 470 | 472 | $contents = file_get_contents($file); |
@@ -70,8 +70,9 @@ discard block |
||
| 70 | 70 | unset($this->tplvars); |
| 71 | 71 | |
| 72 | 72 | $this->tplvars = []; |
| 73 | - foreach ($restorevars as $key => $val) |
|
| 74 | - $this->assign($key, $val); |
|
| 73 | + foreach ($restorevars as $key => $val) { |
|
| 74 | + $this->assign($key, $val); |
|
| 75 | + } |
|
| 75 | 76 | } |
| 76 | 77 | |
| 77 | 78 | /** |
@@ -82,8 +83,9 @@ discard block |
||
| 82 | 83 | */ |
| 83 | 84 | public function merge($instring, $avoidLookup = false) |
| 84 | 85 | { |
| 85 | - if (empty($instring)) |
|
| 86 | - return $instring; |
|
| 86 | + if (empty($instring)) { |
|
| 87 | + return $instring; |
|
| 88 | + } |
|
| 87 | 89 | |
| 88 | 90 | if (!$avoidLookup) { |
| 89 | 91 | |
@@ -97,8 +97,9 @@ |
||
| 97 | 97 | $viewer->assign('MODE', 'edit'); |
| 98 | 98 | } else { |
| 99 | 99 | $firstModuleName = reset($modulesList); |
| 100 | - if ($firstModuleName) |
|
| 101 | - $reportModel->setPrimaryModule($firstModuleName); |
|
| 100 | + if ($firstModuleName) { |
|
| 101 | + $reportModel->setPrimaryModule($firstModuleName); |
|
| 102 | + } |
|
| 102 | 103 | $viewer->assign('MODE', ''); |
| 103 | 104 | } |
| 104 | 105 | |
@@ -34,8 +34,9 @@ discard block |
||
| 34 | 34 | public function parse() |
| 35 | 35 | { |
| 36 | 36 | $tab = $this->prepareFile(); |
| 37 | - foreach ($tab as $line) |
|
| 38 | - $this->parseLine($line); |
|
| 37 | + foreach ($tab as $line) { |
|
| 38 | + $this->parseLine($line); |
|
| 39 | + } |
|
| 39 | 40 | } |
| 40 | 41 | |
| 41 | 42 | public function getXML() |
@@ -53,13 +54,15 @@ discard block |
||
| 53 | 54 | protected function createXML($key, $value, $level) |
| 54 | 55 | { |
| 55 | 56 | $indent = ''; |
| 56 | - for ($i = 0; $i <= $level; $i++) |
|
| 57 | - $indent .= "\t"; |
|
| 57 | + for ($i = 0; $i <= $level; $i++) { |
|
| 58 | + $indent .= "\t"; |
|
| 59 | + } |
|
| 58 | 60 | if (is_array($value)) { |
| 59 | 61 | $xml = "$indent<$key>\n"; |
| 60 | 62 | foreach ($value as $subKey => $subVal) { |
| 61 | - if (is_numeric($subKey)) |
|
| 62 | - $subKey = substr($key, 0, -1); |
|
| 63 | + if (is_numeric($subKey)) { |
|
| 64 | + $subKey = substr($key, 0, -1); |
|
| 65 | + } |
|
| 63 | 66 | $xml .= $this->createXML($subKey, $subVal, $level + 1); |
| 64 | 67 | } |
| 65 | 68 | $xml .= "$indent</$key>\n"; |
@@ -85,10 +88,11 @@ discard block |
||
| 85 | 88 | break; |
| 86 | 89 | case 'NS': |
| 87 | 90 | $code = substr($value, 0, 2); |
| 88 | - if ($code == '22') |
|
| 89 | - $this->ownerName = substr($value, 2); |
|
| 90 | - else if ($code == '23') |
|
| 91 | - $this->accountName = substr($value, 2); |
|
| 91 | + if ($code == '22') { |
|
| 92 | + $this->ownerName = substr($value, 2); |
|
| 93 | + } else if ($code == '23') { |
|
| 94 | + $this->accountName = substr($value, 2); |
|
| 95 | + } |
|
| 92 | 96 | break; |
| 93 | 97 | case '60F': |
| 94 | 98 | $this->openBalance = $this->parseBalance($value); |
@@ -103,10 +107,11 @@ discard block |
||
| 103 | 107 | self::parseOperation($value); |
| 104 | 108 | break; |
| 105 | 109 | case '86': |
| 106 | - if ($this->_lastTag == '61') |
|
| 107 | - $this->parseTransaction($value); |
|
| 108 | - else |
|
| 109 | - $this->info .= $value; |
|
| 110 | + if ($this->_lastTag == '61') { |
|
| 111 | + $this->parseTransaction($value); |
|
| 112 | + } else { |
|
| 113 | + $this->info .= $value; |
|
| 114 | + } |
|
| 110 | 115 | break; |
| 111 | 116 | default: |
| 112 | 117 | break; |
@@ -16,8 +16,9 @@ discard block |
||
| 16 | 16 | public function parse() |
| 17 | 17 | { |
| 18 | 18 | $tab = $this->prepareFile(); |
| 19 | - foreach ($tab as $line) |
|
| 20 | - $this->parseLine($line); |
|
| 19 | + foreach ($tab as $line) { |
|
| 20 | + $this->parseLine($line); |
|
| 21 | + } |
|
| 21 | 22 | } |
| 22 | 23 | |
| 23 | 24 | protected function parseLine($line) |
@@ -36,10 +37,11 @@ discard block |
||
| 36 | 37 | break; |
| 37 | 38 | case 'NS': |
| 38 | 39 | $code = substr($value, 0, 2); |
| 39 | - if ($code == '22') |
|
| 40 | - $this->ownerName = substr($value, 2); |
|
| 41 | - else if ($code == '23') |
|
| 42 | - $this->accountName = substr($value, 2); |
|
| 40 | + if ($code == '22') { |
|
| 41 | + $this->ownerName = substr($value, 2); |
|
| 42 | + } else if ($code == '23') { |
|
| 43 | + $this->accountName = substr($value, 2); |
|
| 44 | + } |
|
| 43 | 45 | break; |
| 44 | 46 | case '60F': |
| 45 | 47 | $this->openBalance = $this->parseBalance($value); |
@@ -62,8 +64,9 @@ discard block |
||
| 62 | 64 | default: |
| 63 | 65 | break; |
| 64 | 66 | } |
| 65 | - if ($tag) |
|
| 66 | - $this->_lastTag = $tag; |
|
| 67 | + if ($tag) { |
|
| 68 | + $this->_lastTag = $tag; |
|
| 69 | + } |
|
| 67 | 70 | } |
| 68 | 71 | |
| 69 | 72 | protected function parseTransaction($value) |
@@ -18,8 +18,9 @@ discard block |
||
| 18 | 18 | public function parse() |
| 19 | 19 | { |
| 20 | 20 | $tab = $this->prepareFile(); |
| 21 | - foreach ($tab as $line) |
|
| 22 | - $this->parseLine($line); |
|
| 21 | + foreach ($tab as $line) { |
|
| 22 | + $this->parseLine($line); |
|
| 23 | + } |
|
| 23 | 24 | } |
| 24 | 25 | |
| 25 | 26 | protected function parseLine($line) |
@@ -38,10 +39,11 @@ discard block |
||
| 38 | 39 | break; |
| 39 | 40 | case 'NS': |
| 40 | 41 | $code = substr($value, 0, 2); |
| 41 | - if ($code == '22') |
|
| 42 | - $this->ownerName = substr($value, 2); |
|
| 43 | - else if ($code == '23') |
|
| 44 | - $this->accountName = substr($value, 2); |
|
| 42 | + if ($code == '22') { |
|
| 43 | + $this->ownerName = substr($value, 2); |
|
| 44 | + } else if ($code == '23') { |
|
| 45 | + $this->accountName = substr($value, 2); |
|
| 46 | + } |
|
| 45 | 47 | break; |
| 46 | 48 | case '60F': |
| 47 | 49 | $this->openBalance = $this->parseBalance($value); |
@@ -56,16 +58,18 @@ discard block |
||
| 56 | 58 | self::parseOperation($value); |
| 57 | 59 | break; |
| 58 | 60 | case '86': |
| 59 | - if ($this->_lastTag == '61') |
|
| 60 | - $this->parseTransaction($value); |
|
| 61 | - else |
|
| 62 | - $this->info .= $value; |
|
| 61 | + if ($this->_lastTag == '61') { |
|
| 62 | + $this->parseTransaction($value); |
|
| 63 | + } else { |
|
| 64 | + $this->info .= $value; |
|
| 65 | + } |
|
| 63 | 66 | break; |
| 64 | 67 | default: |
| 65 | 68 | break; |
| 66 | 69 | } |
| 67 | - if ($tag) |
|
| 68 | - $this->_lastTag = $tag; |
|
| 70 | + if ($tag) { |
|
| 71 | + $this->_lastTag = $tag; |
|
| 72 | + } |
|
| 69 | 73 | } |
| 70 | 74 | |
| 71 | 75 | protected function parseTransaction($value) |
@@ -16,8 +16,9 @@ discard block |
||
| 16 | 16 | public function parse() |
| 17 | 17 | { |
| 18 | 18 | $tab = $this->prepareFile(); |
| 19 | - foreach ($tab as $line) |
|
| 20 | - $this->parseLine($line); |
|
| 19 | + foreach ($tab as $line) { |
|
| 20 | + $this->parseLine($line); |
|
| 21 | + } |
|
| 21 | 22 | } |
| 22 | 23 | |
| 23 | 24 | protected function parseLine($line) |
@@ -36,10 +37,11 @@ discard block |
||
| 36 | 37 | break; |
| 37 | 38 | case 'NS': |
| 38 | 39 | $code = substr($value, 0, 2); |
| 39 | - if ($code == '22') |
|
| 40 | - $this->ownerName = substr($value, 2); |
|
| 41 | - else if ($code == '23') |
|
| 42 | - $this->accountName = substr($value, 2); |
|
| 40 | + if ($code == '22') { |
|
| 41 | + $this->ownerName = substr($value, 2); |
|
| 42 | + } else if ($code == '23') { |
|
| 43 | + $this->accountName = substr($value, 2); |
|
| 44 | + } |
|
| 43 | 45 | break; |
| 44 | 46 | case '60F': |
| 45 | 47 | $this->openBalance = $this->parseBalance($value); |
@@ -54,10 +56,11 @@ discard block |
||
| 54 | 56 | self::parseOperation($value); |
| 55 | 57 | break; |
| 56 | 58 | case '86': |
| 57 | - if ($this->_lastTag == '61') |
|
| 58 | - $this->parseTransaction($value); |
|
| 59 | - else |
|
| 60 | - $this->info .= $value; |
|
| 59 | + if ($this->_lastTag == '61') { |
|
| 60 | + $this->parseTransaction($value); |
|
| 61 | + } else { |
|
| 62 | + $this->info .= $value; |
|
| 63 | + } |
|
| 61 | 64 | break; |
| 62 | 65 | default: |
| 63 | 66 | break; |
@@ -16,8 +16,9 @@ discard block |
||
| 16 | 16 | public function parse() |
| 17 | 17 | { |
| 18 | 18 | $tab = $this->prepareFile(); |
| 19 | - foreach ($tab as $line) |
|
| 20 | - $this->parseLine($line); |
|
| 19 | + foreach ($tab as $line) { |
|
| 20 | + $this->parseLine($line); |
|
| 21 | + } |
|
| 21 | 22 | } |
| 22 | 23 | |
| 23 | 24 | protected function parseLine($line) |
@@ -36,10 +37,11 @@ discard block |
||
| 36 | 37 | break; |
| 37 | 38 | case 'NS': |
| 38 | 39 | $code = substr($value, 0, 2); |
| 39 | - if ($code == '22') |
|
| 40 | - $this->ownerName = substr($value, 2); |
|
| 41 | - else if ($code == '23') |
|
| 42 | - $this->accountName = substr($value, 2); |
|
| 40 | + if ($code == '22') { |
|
| 41 | + $this->ownerName = substr($value, 2); |
|
| 42 | + } else if ($code == '23') { |
|
| 43 | + $this->accountName = substr($value, 2); |
|
| 44 | + } |
|
| 43 | 45 | break; |
| 44 | 46 | case '60F': |
| 45 | 47 | $this->openBalance = $this->parseBalance($value); |
@@ -54,10 +56,11 @@ discard block |
||
| 54 | 56 | self::parseOperation($value); |
| 55 | 57 | break; |
| 56 | 58 | case '86': |
| 57 | - if ($this->_lastTag == 'NS') |
|
| 58 | - $this->parseTransaction($value); |
|
| 59 | - else |
|
| 60 | - $this->info .= $value; |
|
| 59 | + if ($this->_lastTag == 'NS') { |
|
| 60 | + $this->parseTransaction($value); |
|
| 61 | + } else { |
|
| 62 | + $this->info .= $value; |
|
| 63 | + } |
|
| 61 | 64 | break; |
| 62 | 65 | default: |
| 63 | 66 | break; |