1 | <?php |
||
16 | class EMTTretOptAlign extends EMTTret |
||
17 | { |
||
18 | |||
19 | public $classes = array( |
||
20 | 'oa_obracket_sp_s' => "margin-right:0.3em;", |
||
21 | "oa_obracket_sp_b" => "margin-left:-0.3em;", |
||
22 | "oa_obracket_nl_b" => "margin-left:-0.3em;", |
||
23 | "oa_comma_b" => "margin-right:-0.2em;", |
||
24 | "oa_comma_e" => "margin-left:0.2em;", |
||
25 | 'oa_oquote_nl' => "margin-left:-0.44em;", |
||
26 | 'oa_oqoute_sp_s' => "margin-right:0.44em;", |
||
27 | 'oa_oqoute_sp_q' => "margin-left:-0.44em;", |
||
28 | ); |
||
29 | |||
30 | /** |
||
31 | * Базовые параметры тофа |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | public $title = "Оптическое выравнивание"; |
||
36 | public $rules = array( |
||
37 | 'oa_oquote' => array( |
||
38 | 'description' => 'Оптическое выравнивание открывающей кавычки', |
||
39 | //'disabled' => true, |
||
|
|||
40 | 'pattern' => array( |
||
41 | '/([a-zа-яё\-]{3,})(\040|\ \;|\t)(\«\;)/uie', |
||
42 | '/(\n|\r|^)(\«\;)/ei' |
||
43 | ), |
||
44 | 'replacement' => array( |
||
45 | '$m[1] . $this->tag($m[2], "span", array("class"=>"oa_oqoute_sp_s")) . $this->tag($m[3], "span", array("class"=>"oa_oqoute_sp_q"))', |
||
46 | '$m[1] . $this->tag($m[2], "span", array("class"=>"oa_oquote_nl"))', |
||
47 | ), |
||
48 | ), |
||
49 | 'oa_oquote_extra' => array( |
||
50 | 'description' => 'Оптическое выравнивание кавычки', |
||
51 | //'disabled' => true, |
||
52 | 'function' => 'oaquote_extra' |
||
53 | ), |
||
54 | 'oa_obracket_coma' => array( |
||
55 | 'description' => 'Оптическое выравнивание для пунктуации (скобка и запятая)', |
||
56 | //'disabled' => true, |
||
57 | 'pattern' => array( |
||
58 | '/(\040|\ \;|\t)\(/ei', |
||
59 | '/(\n|\r|^)\(/ei', |
||
60 | '/([а-яёa-z0-9]+)\,(\040+)/iue', |
||
61 | ), |
||
62 | 'replacement' => array( |
||
63 | '$this->tag($m[1], "span", array("class"=>"oa_obracket_sp_s")) . $this->tag("(", "span", array("class"=>"oa_obracket_sp_b"))', |
||
64 | '$m[1] . $this->tag("(", "span", array("class"=>"oa_obracket_nl_b"))', |
||
65 | '$m[1] . $this->tag(",", "span", array("class"=>"oa_comma_b")) . $this->tag(" ", "span", array("class"=>"oa_comma_e"))', |
||
66 | ), |
||
67 | ), |
||
68 | |||
69 | ); |
||
70 | |||
71 | /** |
||
72 | * Если стоит открывающая кавычка после <p> надо делать её висячей |
||
73 | * |
||
74 | * @return void |
||
75 | */ |
||
76 | protected function oaquote_extra() |
||
83 | |||
84 | |||
85 | } |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.