@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | ) |
70 | 70 | ); |
71 | 71 | |
72 | - /** |
|
73 | - * @var array |
|
74 | - */ |
|
72 | + /** |
|
73 | + * @var array |
|
74 | + */ |
|
75 | 75 | protected $selected = array(); |
76 | 76 | |
77 | 77 | public function convert(string $string) : string |
@@ -81,16 +81,16 @@ discard block |
||
81 | 81 | return str_replace(array_keys($chars), array_values($chars), $string); |
82 | 82 | } |
83 | 83 | |
84 | - /** |
|
85 | - * Selects a character set to replace. Can be called |
|
86 | - * several times to add additional sets to the collection. |
|
87 | - * |
|
88 | - * @param string $type See the <code>CHAR_XXX</code> constants. |
|
89 | - * @return ConvertHelper_HiddenConverter |
|
90 | - * |
|
91 | - * @see ConvertHelper_HiddenConverter::CHARS_CONTROL |
|
92 | - * @see ConvertHelper_HiddenConverter::CHARS_WHITESPACE |
|
93 | - */ |
|
84 | + /** |
|
85 | + * Selects a character set to replace. Can be called |
|
86 | + * several times to add additional sets to the collection. |
|
87 | + * |
|
88 | + * @param string $type See the <code>CHAR_XXX</code> constants. |
|
89 | + * @return ConvertHelper_HiddenConverter |
|
90 | + * |
|
91 | + * @see ConvertHelper_HiddenConverter::CHARS_CONTROL |
|
92 | + * @see ConvertHelper_HiddenConverter::CHARS_WHITESPACE |
|
93 | + */ |
|
94 | 94 | public function selectCharacters(string $type) : ConvertHelper_HiddenConverter |
95 | 95 | { |
96 | 96 | if(!in_array($type, $this->selected)) { |
@@ -100,11 +100,11 @@ discard block |
||
100 | 100 | return $this; |
101 | 101 | } |
102 | 102 | |
103 | - /** |
|
104 | - * Resolves the list of characters to make visible. |
|
105 | - * |
|
106 | - * @return array |
|
107 | - */ |
|
103 | + /** |
|
104 | + * Resolves the list of characters to make visible. |
|
105 | + * |
|
106 | + * @return array |
|
107 | + */ |
|
108 | 108 | protected function resolveSelection() : array |
109 | 109 | { |
110 | 110 | $selected = $this->selected; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function selectCharacters(string $type) : ConvertHelper_HiddenConverter |
95 | 95 | { |
96 | - if(!in_array($type, $this->selected)) { |
|
96 | + if (!in_array($type, $this->selected)) { |
|
97 | 97 | $this->selected[] = $type; |
98 | 98 | } |
99 | 99 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | { |
110 | 110 | $selected = $this->selected; |
111 | 111 | |
112 | - if(empty($this->selected)) |
|
112 | + if (empty($this->selected)) |
|
113 | 113 | { |
114 | 114 | $selected = array( |
115 | 115 | self::CHARS_WHITESPACE, |
@@ -119,9 +119,9 @@ discard block |
||
119 | 119 | |
120 | 120 | $result = array(); |
121 | 121 | |
122 | - foreach($selected as $type) |
|
122 | + foreach ($selected as $type) |
|
123 | 123 | { |
124 | - if(isset($this->characters[$type])) |
|
124 | + if (isset($this->characters[$type])) |
|
125 | 125 | { |
126 | 126 | $result = array_merge($result, $this->characters[$type]); |
127 | 127 | } |