@@ -62,19 +62,19 @@ discard block |
||
| 62 | 62 | $address .= '?'; |
| 63 | 63 | |
| 64 | 64 | if (!empty($subject)) { |
| 65 | - $address .= 'subject=' . rawurlencode($subject) . '&'; |
|
| 65 | + $address .= 'subject='.rawurlencode($subject).'&'; |
|
| 66 | 66 | } |
| 67 | 67 | if (!empty($cc)) { |
| 68 | - $address .= 'cc=' . rawurlencode($cc) . '&'; |
|
| 68 | + $address .= 'cc='.rawurlencode($cc).'&'; |
|
| 69 | 69 | } |
| 70 | 70 | if (!empty($bcc)) { |
| 71 | - $address .= 'bcc=' . rawurlencode($bcc) . '&'; |
|
| 71 | + $address .= 'bcc='.rawurlencode($bcc).'&'; |
|
| 72 | 72 | } |
| 73 | 73 | if (!empty($newsgroups)) { |
| 74 | - $address .= 'newsgroups=' . rawurlencode($newsgroups) . '&'; |
|
| 74 | + $address .= 'newsgroups='.rawurlencode($newsgroups).'&'; |
|
| 75 | 75 | } |
| 76 | 76 | if (!empty($followupto)) { |
| 77 | - $address .= 'followupto=' . rawurlencode($followupto) . '&'; |
|
| 77 | + $address .= 'followupto='.rawurlencode($followupto).'&'; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $address = rtrim($address, '?&'); |
@@ -84,34 +84,34 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | case 'none': |
| 86 | 86 | case null: |
| 87 | - return '<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>'; |
|
| 87 | + return '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>'; |
|
| 88 | 88 | |
| 89 | 89 | case 'js': |
| 90 | 90 | case 'javascript': |
| 91 | - $str = 'document.write(\'<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>\');'; |
|
| 91 | + $str = 'document.write(\'<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>\');'; |
|
| 92 | 92 | $len = strlen($str); |
| 93 | 93 | |
| 94 | 94 | $out = ''; |
| 95 | 95 | for ($i = 0; $i < $len; ++ $i) { |
| 96 | - $out .= '%' . bin2hex($str[$i]); |
|
| 96 | + $out .= '%'.bin2hex($str[$i]); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - return '<script type="text/javascript">eval(unescape(\'' . $out . '\'));</script>'; |
|
| 99 | + return '<script type="text/javascript">eval(unescape(\''.$out.'\'));</script>'; |
|
| 100 | 100 | |
| 101 | 101 | break; |
| 102 | 102 | case 'javascript_charcode': |
| 103 | 103 | case 'js_charcode': |
| 104 | 104 | case 'jscharcode': |
| 105 | 105 | case 'jschar': |
| 106 | - $str = '<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>'; |
|
| 106 | + $str = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>'; |
|
| 107 | 107 | $len = strlen($str); |
| 108 | 108 | |
| 109 | - $out = '<script type="text/javascript">' . "\n<!--\ndocument.write(Str.fromCharCode("; |
|
| 109 | + $out = '<script type="text/javascript">'."\n<!--\ndocument.write(Str.fromCharCode("; |
|
| 110 | 110 | for ($i = 0; $i < $len; ++ $i) { |
| 111 | - $out .= ord($str[$i]) . ','; |
|
| 111 | + $out .= ord($str[$i]).','; |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - return rtrim($out, ',') . "));\n-->\n</script>\n"; |
|
| 114 | + return rtrim($out, ',')."));\n-->\n</script>\n"; |
|
| 115 | 115 | |
| 116 | 116 | break; |
| 117 | 117 | |
@@ -124,18 +124,18 @@ discard block |
||
| 124 | 124 | $len = strlen($address); |
| 125 | 125 | for ($i = 0; $i < $len; ++ $i) { |
| 126 | 126 | if (preg_match('#\w#', $address[$i])) { |
| 127 | - $out .= '%' . bin2hex($address[$i]); |
|
| 127 | + $out .= '%'.bin2hex($address[$i]); |
|
| 128 | 128 | } else { |
| 129 | 129 | $out .= $address[$i]; |
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | - $out .= '" ' . $extra . '>'; |
|
| 132 | + $out .= '" '.$extra.'>'; |
|
| 133 | 133 | $len = strlen($text); |
| 134 | 134 | for ($i = 0; $i < $len; ++ $i) { |
| 135 | - $out .= '&#x' . bin2hex($text[$i]); |
|
| 135 | + $out .= '&#x'.bin2hex($text[$i]); |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - return $out . '</a>'; |
|
| 138 | + return $out.'</a>'; |
|
| 139 | 139 | |
| 140 | 140 | default: |
| 141 | 141 | $this->core->triggerError('Mailto: <em>encode</em> argument is invalid, it must be one of : <em>none (= no value), js, js_charcode or hex</em>', E_USER_WARNING); |
@@ -68,17 +68,17 @@ discard block |
||
| 68 | 68 | $include = $this->core->templateFactory($resource, $identifier, $cache_time, $cache_id, $compile_id); |
| 69 | 69 | } |
| 70 | 70 | catch (SecurityException $e) { |
| 71 | - $this->core->triggerError('Include : Security restriction : ' . $e->getMessage(), E_USER_WARNING); |
|
| 71 | + $this->core->triggerError('Include : Security restriction : '.$e->getMessage(), E_USER_WARNING); |
|
| 72 | 72 | } |
| 73 | 73 | catch (Exception $e) { |
| 74 | - $this->core->triggerError('Include : ' . $e->getMessage(), E_USER_WARNING); |
|
| 74 | + $this->core->triggerError('Include : '.$e->getMessage(), E_USER_WARNING); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | if ($include === null) { |
| 78 | - $this->core->triggerError('Include : Resource "' . $resource . ':' . $identifier . '" not found.', |
|
| 78 | + $this->core->triggerError('Include : Resource "'.$resource.':'.$identifier.'" not found.', |
|
| 79 | 79 | E_USER_WARNING); |
| 80 | 80 | } elseif ($include === false) { |
| 81 | - $this->core->triggerError('Include : Resource "' . $resource . '" does not support includes.', |
|
| 81 | + $this->core->triggerError('Include : Resource "'.$resource.'" does not support includes.', |
|
| 82 | 82 | E_USER_WARNING); |
| 83 | 83 | } |
| 84 | 84 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | if (count($rest)) { |
| 92 | - $vars = $rest + $vars; |
|
| 92 | + $vars = $rest+$vars; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $clone = clone $this->core; |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | return "preg_replace('#<[^>]*>#', ' ', $value)"; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - return "preg_replace('#<\\s*\\/?(" . $allowable_tags . ")\\s*[^>]*?>#im', ' ', $value)"; |
|
| 50 | + return "preg_replace('#<\\s*\\/?(".$allowable_tags.")\\s*[^>]*?>#im', ' ', $value)"; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | return "strip_tags($value, $allowable_tags)"; |
@@ -60,10 +60,10 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | if ($tpl === null) { |
| 62 | 62 | throw new CompilationException($compiler, |
| 63 | - 'Load Templates : Resource "' . $resource . ':' . $identifier . '" not found.'); |
|
| 63 | + 'Load Templates : Resource "'.$resource.':'.$identifier.'" not found.'); |
|
| 64 | 64 | } elseif ($tpl === false) { |
| 65 | 65 | throw new CompilationException($compiler, |
| 66 | - 'Load Templates : Resource "' . $resource . '" does not support includes.'); |
|
| 66 | + 'Load Templates : Resource "'.$resource.'" does not support includes.'); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | $cmp = clone $compiler; |
@@ -75,23 +75,23 @@ discard block |
||
| 75 | 75 | $compiler->addUsedPlugin($plugin, $type); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - $out = '\'\';// checking for modification in ' . $resource . ':' . $identifier . "\r\n"; |
|
| 78 | + $out = '\'\';// checking for modification in '.$resource.':'.$identifier."\r\n"; |
|
| 79 | 79 | |
| 80 | 80 | $modCheck = $tpl->getIsModifiedCode(); |
| 81 | 81 | |
| 82 | 82 | if ($modCheck) { |
| 83 | - $out .= 'if (!(' . $modCheck . ')) { ob_end_clean(); return false; }'; |
|
| 83 | + $out .= 'if (!('.$modCheck.')) { ob_end_clean(); return false; }'; |
|
| 84 | 84 | } else { |
| 85 | 85 | $out .= 'try { |
| 86 | - $tpl = $this->templateFactory("' . $resource . '", "' . $identifier . '"); |
|
| 86 | + $tpl = $this->templateFactory("' . $resource.'", "'.$identifier.'"); |
|
| 87 | 87 | } catch (Dwoo\Exception $e) { |
| 88 | - $this->triggerError(\'Load Templates : Resource <em>' . $resource . '</em> was not added to Dwoo, can not extend <em>' . $identifier . '</em>\', E_USER_WARNING); |
|
| 88 | + $this->triggerError(\'Load Templates : Resource <em>' . $resource.'</em> was not added to Dwoo, can not extend <em>'.$identifier.'</em>\', E_USER_WARNING); |
|
| 89 | 89 | } |
| 90 | 90 | if ($tpl === null) |
| 91 | - $this->triggerError(\'Load Templates : Resource "' . $resource . ':' . $identifier . '" was not found.\', E_USER_WARNING); |
|
| 91 | + $this->triggerError(\'Load Templates : Resource "' . $resource.':'.$identifier.'" was not found.\', E_USER_WARNING); |
|
| 92 | 92 | elseif ($tpl === false) |
| 93 | - $this->triggerError(\'Load Templates : Resource "' . $resource . '" does not support extends.\', E_USER_WARNING); |
|
| 94 | -if ($tpl->getUid() != "' . $tpl->getUid() . '") { ob_end_clean(); return false; }'; |
|
| 93 | + $this->triggerError(\'Load Templates : Resource "' . $resource.'" does not support extends.\', E_USER_WARNING); |
|
| 94 | +if ($tpl->getUid() != "' . $tpl->getUid().'") { ob_end_clean(); return false; }'; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | return $out; |
@@ -42,6 +42,6 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public static function compile(Compiler $compiler, $value, $by = 4, $char = ' ') |
| 44 | 44 | { |
| 45 | - return "preg_replace('#^#m', '" . str_repeat(substr($char, 1, - 1), trim($by, '"\'')) . "', $value)"; |
|
| 45 | + return "preg_replace('#^#m', '".str_repeat(substr($char, 1, - 1), trim($by, '"\''))."', $value)"; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | \ No newline at end of file |
@@ -48,22 +48,22 @@ |
||
| 48 | 48 | return ''; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - $value = (string)$value; |
|
| 52 | - $etc = (string)$etc; |
|
| 53 | - $length = (int)$length; |
|
| 51 | + $value = (string) $value; |
|
| 52 | + $etc = (string) $etc; |
|
| 53 | + $length = (int) $length; |
|
| 54 | 54 | |
| 55 | 55 | if (strlen($value) < $length) { |
| 56 | 56 | return $value; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - $length = max($length - strlen($etc), 0); |
|
| 59 | + $length = max($length-strlen($etc), 0); |
|
| 60 | 60 | if ($break === false && $middle === false) { |
| 61 | - $value = preg_replace('#\s+(\S*)?$#', '', substr($value, 0, $length + 1)); |
|
| 61 | + $value = preg_replace('#\s+(\S*)?$#', '', substr($value, 0, $length+1)); |
|
| 62 | 62 | } |
| 63 | 63 | if ($middle === false) { |
| 64 | - return substr($value, 0, $length) . $etc; |
|
| 64 | + return substr($value, 0, $length).$etc; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - return substr($value, 0, ceil($length / 2)) . $etc . substr($value, - floor($length / 2)); |
|
| 67 | + return substr($value, 0, ceil($length/2)).$etc.substr($value, - floor($length/2)); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | \ No newline at end of file |
@@ -40,6 +40,6 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public static function compile(Compiler $compiler, $value, $default = '') |
| 42 | 42 | { |
| 43 | - return '(($tmp = ' . $value . ')===null||$tmp===\'\' ? ' . $default . ' : $tmp)'; |
|
| 43 | + return '(($tmp = '.$value.')===null||$tmp===\'\' ? '.$default.' : $tmp)'; |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | \ No newline at end of file |
@@ -39,6 +39,6 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public static function compile(Compiler $compiler, $value, array $rest) |
| 41 | 41 | { |
| 42 | - return '(' . $value . ').(' . implode(').(', $rest) . ')'; |
|
| 42 | + return '('.$value.').('.implode(').(', $rest).')'; |
|
| 43 | 43 | } |
| 44 | 44 | } |
@@ -41,9 +41,9 @@ |
||
| 41 | 41 | public static function compile(Compiler $compiler, $value, $count_spaces = false) |
| 42 | 42 | { |
| 43 | 43 | if ($count_spaces === 'false') { |
| 44 | - return 'preg_match_all(\'#[^\s\pZ]#u\', ' . $value . ', $tmp)'; |
|
| 44 | + return 'preg_match_all(\'#[^\s\pZ]#u\', '.$value.', $tmp)'; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - return 'mb_strlen(' . $value . ', $this->charset)'; |
|
| 47 | + return 'mb_strlen('.$value.', $this->charset)'; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | \ No newline at end of file |