@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * @param string $content |
| 40 | 40 | * @param array $conf |
| 41 | 41 | * |
| 42 | - * @return array |
|
| 42 | + * @return string |
|
| 43 | 43 | */ |
| 44 | 44 | public function render($content, $conf) { |
| 45 | 45 | $lines = array(); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | public function render($content, $conf) { |
| 45 | 45 | $lines = array(); |
| 46 | 46 | $this->conf = $conf; |
| 47 | - $CType = (string)$this->cObj->data['CType']; |
|
| 47 | + $CType = (string) $this->cObj->data['CType']; |
|
| 48 | 48 | if (isset($this->conf['forceCType']) && trim($this->conf['forceCType']) !== '') { |
| 49 | 49 | $CType = trim($this->conf['forceCType']); |
| 50 | 50 | } |
@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | $renderObject = $objectManager->get($className); |
| 78 | 78 | $lines = $renderObject->render($this->cObj, $this->conf); |
| 79 | 79 | } else { |
| 80 | - $lines[] = 'CType: ' . $CType . ' have no rendering definitions'; |
|
| 80 | + $lines[] = 'CType: '.$CType.' have no rendering definitions'; |
|
| 81 | 81 | } |
| 82 | 82 | $content = implode(LF, $lines); |
| 83 | - return trim($content, CRLF . TAB); |
|
| 83 | + return trim($content, CRLF.TAB); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -99,6 +99,6 @@ discard block |
||
| 99 | 99 | if (strtolower(substr($theLink, 0, 7)) == 'mailto:') { |
| 100 | 100 | $theLink = substr($theLink, 7); |
| 101 | 101 | } |
| 102 | - return $this->cObj->getCurrentVal() . ' ( ' . $theLink . ' )'; |
|
| 102 | + return $this->cObj->getCurrentVal().' ( '.$theLink.' )'; |
|
| 103 | 103 | } |
| 104 | 104 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * Render the given element |
| 21 | 21 | * |
| 22 | - * @return array |
|
| 22 | + * @return string[] |
|
| 23 | 23 | */ |
| 24 | 24 | public function renderInternal() { |
| 25 | 25 | $headerWrap = MailUtility::breakLinesForEmail(trim($this->contentObject->data['header']), LF, Configuration::getPlainTextWith()); |
@@ -30,12 +30,12 @@ |
||
| 30 | 30 | if ($this->contentObject->data['header_position'] == 'right') { |
| 31 | 31 | foreach ($header as $key => $l) { |
| 32 | 32 | $l = trim($l); |
| 33 | - $header[$key] = str_pad(' ', (Configuration::getPlainTextWith() - strlen($l)), ' ', STR_PAD_LEFT) . $l; |
|
| 33 | + $header[$key] = str_pad(' ', (Configuration::getPlainTextWith() - strlen($l)), ' ', STR_PAD_LEFT).$l; |
|
| 34 | 34 | } |
| 35 | 35 | } elseif ($this->contentObject->data['header_position'] == 'center') { |
| 36 | 36 | foreach ($header as $key => $l) { |
| 37 | 37 | $l = trim($l); |
| 38 | - $header[$key] = str_pad(' ', floor((Configuration::getPlainTextWith() - strlen($l)) / 2), ' ', STR_PAD_LEFT) . $l; |
|
| 38 | + $header[$key] = str_pad(' ', floor((Configuration::getPlainTextWith() - strlen($l)) / 2), ' ', STR_PAD_LEFT).$l; |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | $header = implode(LF, $header); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * Render the given element |
| 21 | 21 | * |
| 22 | - * @return array |
|
| 22 | + * @return string[] |
|
| 23 | 23 | */ |
| 24 | 24 | public function renderInternal() { |
| 25 | 25 | $objectManager = new ObjectManager(); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $theLink = $this->getLink($ll); |
| 68 | 68 | if ($theLink) { |
| 69 | - $lines[] = $this->configuration['images.']['linkPrefix'] . $theLink; |
|
| 69 | + $lines[] = $this->configuration['images.']['linkPrefix'].$theLink; |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | $imageExists = TRUE; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | if ($links && count($linksArr) == 1) { |
| 79 | 79 | $theLink = $this->getLink($links); |
| 80 | 80 | if ($theLink) { |
| 81 | - $lines[] = $this->configuration['images.']['linkPrefix'] . $theLink; |
|
| 81 | + $lines[] = $this->configuration['images.']['linkPrefix'].$theLink; |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | if ($caption) { |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $lines[] = $this->breakContent($caption); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - return chr(10) . implode(chr(10), $lines); |
|
| 93 | + return chr(10).implode(chr(10), $lines); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | } |
| 97 | 97 | \ No newline at end of file |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * Render the given element |
| 21 | 21 | * |
| 22 | - * @return array |
|
| 22 | + * @return string |
|
| 23 | 23 | */ |
| 24 | 24 | public function renderInternal() { |
| 25 | 25 | $str = $this->contentObject->cObjGetSingle($this->configuration['menu'], $this->configuration['menu.']); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | $type = $contentObject->data['layout']; |
| 40 | 40 | $type = MathUtility::forceIntegerInRange($type, 0, 3); |
| 41 | 41 | |
| 42 | - $tConf = $this->configuration['bulletlist.'][$type . '.']; |
|
| 42 | + $tConf = $this->configuration['bulletlist.'][$type.'.']; |
|
| 43 | 43 | |
| 44 | 44 | $cParts = explode(chr(10), $str); |
| 45 | 45 | $lines = array(); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $bullet = substr(str_replace('#', $c, $bullet), 0, $bLen); |
| 56 | 56 | $secondRow = substr($tConf['secondRow'] ? $tConf['secondRow'] : str_pad('', strlen($bullet), ' '), 0, $bLen); |
| 57 | 57 | |
| 58 | - $lines[] = $bullet . $this->breakLines($substrs, chr(10) . $secondRow, Configuration::getPlainTextWith() - $bLen); |
|
| 58 | + $lines[] = $bullet.$this->breakLines($substrs, chr(10).$secondRow, Configuration::getPlainTextWith() - $bLen); |
|
| 59 | 59 | |
| 60 | 60 | $blanks = MathUtility::forceIntegerInRange($tConf['blanks'], 0, 1000); |
| 61 | 61 | if ($blanks) { |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * Render the current content |
| 17 | 17 | * |
| 18 | - * @return array |
|
| 18 | + * @return string[] |
|
| 19 | 19 | */ |
| 20 | 20 | public function renderInternal() { |
| 21 | 21 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function renderInternal() { |
| 21 | 21 | |
| 22 | - $lines[] = trim($this->breakContent(strip_tags($this->parseBody($this->contentObject->data['bodytext']))), CRLF . TAB); |
|
| 22 | + $lines[] = trim($this->breakContent(strip_tags($this->parseBody($this->contentObject->data['bodytext']))), CRLF.TAB); |
|
| 23 | 23 | return $lines; |
| 24 | 24 | |
| 25 | 25 | } |
@@ -341,6 +341,10 @@ |
||
| 341 | 341 | return $file; |
| 342 | 342 | } |
| 343 | 343 | |
| 344 | + /** |
|
| 345 | + * @param string $class |
|
| 346 | + * @param string $ext |
|
| 347 | + */ |
|
| 344 | 348 | private function findFileWithExtension($class, $ext) |
| 345 | 349 | { |
| 346 | 350 | // PSR-4 lookup |
@@ -344,14 +344,14 @@ discard block |
||
| 344 | 344 | private function findFileWithExtension($class, $ext) |
| 345 | 345 | { |
| 346 | 346 | // PSR-4 lookup |
| 347 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
| 347 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; |
|
| 348 | 348 | |
| 349 | 349 | $first = $class[0]; |
| 350 | 350 | if (isset($this->prefixLengthsPsr4[$first])) { |
| 351 | 351 | foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { |
| 352 | 352 | if (0 === strpos($class, $prefix)) { |
| 353 | 353 | foreach ($this->prefixDirsPsr4[$prefix] as $dir) { |
| 354 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { |
|
| 354 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $length))) { |
|
| 355 | 355 | return $file; |
| 356 | 356 | } |
| 357 | 357 | } |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | |
| 362 | 362 | // PSR-4 fallback dirs |
| 363 | 363 | foreach ($this->fallbackDirsPsr4 as $dir) { |
| 364 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
| 364 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
| 365 | 365 | return $file; |
| 366 | 366 | } |
| 367 | 367 | } |
@@ -373,14 +373,14 @@ discard block |
||
| 373 | 373 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); |
| 374 | 374 | } else { |
| 375 | 375 | // PEAR-like class name |
| 376 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
| 376 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; |
|
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | if (isset($this->prefixesPsr0[$first])) { |
| 380 | 380 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
| 381 | 381 | if (0 === strpos($class, $prefix)) { |
| 382 | 382 | foreach ($dirs as $dir) { |
| 383 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
| 383 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
| 384 | 384 | return $file; |
| 385 | 385 | } |
| 386 | 386 | } |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | |
| 391 | 391 | // PSR-0 fallback dirs |
| 392 | 392 | foreach ($this->fallbackDirsPsr0 as $dir) { |
| 393 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
| 393 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
| 394 | 394 | return $file; |
| 395 | 395 | } |
| 396 | 396 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * |
| 59 | 59 | * @throws SyntaxErrorException |
| 60 | 60 | * |
| 61 | - * @return array |
|
| 61 | + * @return integer[] |
|
| 62 | 62 | */ |
| 63 | 63 | public static function parseSeries(array $tokens) |
| 64 | 64 | { |
@@ -68,11 +68,11 @@ |
||
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - $joined = trim(implode('', array_map(function (Token $token) { |
|
| 71 | + $joined = trim(implode('', array_map(function(Token $token) { |
|
| 72 | 72 | return $token->getValue(); |
| 73 | 73 | }, $tokens))); |
| 74 | 74 | |
| 75 | - $int = function ($string) { |
|
| 75 | + $int = function($string) { |
|
| 76 | 76 | if (!is_numeric($string)) { |
| 77 | 77 | throw SyntaxErrorException::stringAsFunctionArgument(); |
| 78 | 78 | } |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | - * @param array $values |
|
| 92 | + * @param string[] $values |
|
| 93 | 93 | * |
| 94 | 94 | * @return bool |
| 95 | 95 | */ |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | /** |
| 67 | 67 | * @param int $flag |
| 68 | 68 | * |
| 69 | - * @return bool |
|
| 69 | + * @return integer |
|
| 70 | 70 | */ |
| 71 | 71 | public function hasFlag($flag) |
| 72 | 72 | { |