1 | <?php |
||
10 | class Text extends AbstractTret |
||
11 | { |
||
12 | public $classes = array( |
||
13 | 'nowrap' => 'word-spacing:nowrap;', |
||
14 | ); |
||
15 | |||
16 | /** |
||
17 | * Базовые параметры тофа |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | public $title = "Текст и абзацы"; |
||
22 | public $rules = array( |
||
23 | 'auto_links' => array( |
||
24 | 'description' => 'Выделение ссылок из текста', |
||
25 | 'pattern' => '/(\s|^)(http|ftp|mailto|https)(:\/\/)([^\s\,\!\<]{4,})(\s|\.|\,|\!|\?|\<|$)/ieu', |
||
26 | 'replacement' => '$m[1] . $this->tag((substr($m[4],-1)=="."?substr($m[4],0,-1):$m[4]), "a", array("href" => $m[2].$m[3].(substr($m[4],-1)=="."?substr($m[4],0,-1):$m[4]))) . (substr($m[4],-1)=="."?".":"") .$m[5]' |
||
27 | ), |
||
28 | 'email' => array( |
||
29 | 'description' => 'Выделение эл. почты из текста', |
||
30 | 'pattern' => '/(\s|^|\ \;|\()([a-z0-9\-\_\.]{2,})\@([a-z0-9\-\.]{2,})\.([a-z]{2,6})(\)|\s|\.|\,|\!|\?|$|\<)/e', |
||
31 | 'replacement' => '$m[1] . $this->tag($m[2]."@".$m[3].".".$m[4], "a", array("href" => "mailto:".$m[2]."@".$m[3].".".$m[4])) . $m[5]' |
||
32 | ), |
||
33 | 'no_repeat_words' => array( |
||
34 | 'description' => 'Удаление повторяющихся слов', |
||
35 | 'disabled' => true, |
||
36 | 'pattern' => array( |
||
37 | '/([а-яё]{3,})( |\t|\ \;)\1/iu', |
||
38 | '/(\s|\ \;|^|\.|\!|\?)(([А-ЯЁ])([а-яё]{2,}))( |\t|\ \;)(([а-яё])\4)/eu', |
||
39 | ), |
||
40 | 'replacement' => array( |
||
41 | '\1', |
||
42 | '$m[1].($m[7] === \EMT\Util::strtolower($m[3]) ? $m[2] : $m[2].$m[5].$m[6] )', |
||
43 | ) |
||
44 | ), |
||
45 | 'paragraphs' => array( |
||
46 | 'description' => 'Простановка параграфов', |
||
47 | 'function' => 'build_paragraphs' |
||
48 | ), |
||
49 | 'breakline' => array( |
||
50 | 'description' => 'Простановка переносов строк', |
||
51 | 'function' => 'build_brs' |
||
52 | ), |
||
53 | |||
54 | ); |
||
55 | |||
56 | /** |
||
57 | * Расстановка защищенных тегов параграфа (<p>...</p>) и переноса строки |
||
58 | * |
||
59 | * @return void |
||
60 | */ |
||
61 | protected function do_paragraphs($text) |
||
75 | |||
76 | /** |
||
77 | * Расстановка защищенных тегов параграфа (<p>...</p>) и переноса строки |
||
78 | * |
||
79 | * @return void |
||
80 | */ |
||
81 | protected function build_paragraphs() |
||
97 | |||
98 | /** |
||
99 | * Расстановка защищенных тегов параграфа (<p>...</p>) и переноса строки |
||
100 | * |
||
101 | * @return void |
||
102 | */ |
||
103 | protected function build_brs() |
||
114 | } |
||
115 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.