mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Formatting
This commit is contained in:
parent
5e42892979
commit
16d5f337c0
@ -107,11 +107,9 @@ class Modifier
|
||||
if (preg_match('#^(.{' . $length . '}).*?(.{' . $length . '})?$#usS', $string, $match)) {
|
||||
if (count($match) == 3) {
|
||||
if ($by_words) {
|
||||
return preg_replace('#\s.*$#usS', "", $match[1]) . $etc . preg_replace(
|
||||
'#.*\s#usS',
|
||||
"",
|
||||
$match[2]
|
||||
);
|
||||
return preg_replace('#\s.*$#usS', "", $match[1]) .
|
||||
$etc .
|
||||
preg_replace('#.*\s#usS', "", $match[2]);
|
||||
} else {
|
||||
return $match[1] . $etc . $match[2];
|
||||
}
|
||||
|
@ -146,8 +146,8 @@ class Provider implements ProviderInterface
|
||||
*/
|
||||
protected function _getTemplatePath($tpl)
|
||||
{
|
||||
|
||||
if (($path = realpath($this->_path . "/" . $tpl)) && strpos($path, $this->_path) === 0) {
|
||||
$path = realpath($this->_path . "/" . $tpl);
|
||||
if ($path && strpos($path, $this->_path) === 0) {
|
||||
return $path;
|
||||
} else {
|
||||
throw new \RuntimeException("Template $tpl not found");
|
||||
|
Loading…
Reference in New Issue
Block a user