@@ -40,8 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | if (isset($arr['status']) && $type == 2) { |
42 | 42 | $ret=$arr; |
43 | - } |
|
44 | - else { |
|
43 | + } else { |
|
45 | 44 | $ret['status']=$type; |
46 | 45 | $ret['data']=$arr; |
47 | 46 | } |
@@ -323,8 +322,7 @@ discard block |
||
323 | 322 | if ($filters) { |
324 | 323 | if (is_string($filters)) { |
325 | 324 | $filters=explode(',', $filters); |
326 | - } |
|
327 | - else if (is_array($filters)) { |
|
325 | + } else if (is_array($filters)) { |
|
328 | 326 | foreach ($filters as $filter) { |
329 | 327 | $data=array_map_recursive($filter, $data); // 参数过滤 |
330 | 328 | } |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | |
408 | 408 | // 过滤查询特殊字符 |
409 | 409 | if (preg_match('/^(EXP|NEQ|GT|EGT|LT|ELT|OR|XOR|LIKE|NOTLIKE|NOT BETWEEN|NOTBETWEEN|BETWEEN|NOTIN|NOT IN|IN)$/i', $value)) { |
410 | - $value .= ' '; |
|
410 | + $value.=' '; |
|
411 | 411 | } |
412 | 412 | } |
413 | 413 | /** |
@@ -415,15 +415,15 @@ discard block |
||
415 | 415 | * |
416 | 416 | * @return string|null |
417 | 417 | */ |
418 | -function config($name=null,$value=null,$default=null){ |
|
418 | +function config($name=null, $value=null, $default=null) { |
|
419 | 419 | $config=\puck\Conf::load(); |
420 | - if ($name===null){ |
|
420 | + if ($name === null) { |
|
421 | 421 | return $config->all(); |
422 | 422 | } |
423 | - if ($value===null){ |
|
424 | - return $config->get($name,$default); |
|
423 | + if ($value === null) { |
|
424 | + return $config->get($name, $default); |
|
425 | 425 | } |
426 | - $config->set($name,$value); |
|
426 | + $config->set($name, $value); |
|
427 | 427 | } |
428 | 428 | /** |
429 | 429 | * 字符串命名风格转换 |
@@ -440,14 +440,14 @@ discard block |
||
440 | 440 | } |
441 | 441 | } |
442 | 442 | |
443 | -if (! function_exists('app')) { |
|
443 | +if (!function_exists('app')) { |
|
444 | 444 | /** |
445 | 445 | * Get the available container instance. |
446 | 446 | * |
447 | 447 | * @param string $make |
448 | 448 | * @return mixed|\Laravel\Lumen\Application |
449 | 449 | */ |
450 | - function app($make = null) |
|
450 | + function app($make=null) |
|
451 | 451 | { |
452 | 452 | if (is_null($make)) { |
453 | 453 | return Container::getInstance(); |
@@ -1,199 +1,199 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace puck\helpers; |
3 | 3 | class Chaos { |
4 | - public $GbToBigArray; |
|
5 | - public $_pinyin; |
|
6 | - public $string; |
|
7 | - public $url=''; |
|
8 | - public $msg=''; |
|
9 | - public $action; |
|
10 | - private $prefix; |
|
4 | + public $GbToBigArray; |
|
5 | + public $_pinyin; |
|
6 | + public $string; |
|
7 | + public $url=''; |
|
8 | + public $msg=''; |
|
9 | + public $action; |
|
10 | + private $prefix; |
|
11 | 11 | |
12 | 12 | function __construct() { |
13 | - $this->_pinyin=new PinYin(); |
|
14 | - } |
|
13 | + $this->_pinyin=new PinYin(); |
|
14 | + } |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * @param array $prefix |
18 | 18 | */ |
19 | 19 | public function addPrefix(array $prefix) { |
20 | 20 | $this->prefix=$prefix[array_rand($prefix)]; |
21 | - } |
|
21 | + } |
|
22 | 22 | |
23 | 23 | public function clearPrefix() { |
24 | 24 | $this->prefix=''; |
25 | - } |
|
25 | + } |
|
26 | 26 | public function get($str) { |
27 | 27 | $this->cutting($str); |
28 | 28 | $this->convert(); |
29 | 29 | $this->clearPrefix(); |
30 | 30 | return $this->msg; |
31 | - } |
|
31 | + } |
|
32 | 32 | |
33 | - //分离URL |
|
34 | - private function cutting($str) { |
|
33 | + //分离URL |
|
34 | + private function cutting($str) { |
|
35 | 35 | |
36 | - if (preg_match("@(http://[^\\s]+)@i", $str, $result)) { |
|
37 | - $this->url=$result[1]; |
|
38 | - $this->msg=$str=str_replace($this->url, '%%%%', $str); |
|
39 | - } else { |
|
40 | - $this->msg=$str; |
|
41 | - } |
|
42 | - } |
|
36 | + if (preg_match("@(http://[^\\s]+)@i", $str, $result)) { |
|
37 | + $this->url=$result[1]; |
|
38 | + $this->msg=$str=str_replace($this->url, '%%%%', $str); |
|
39 | + } else { |
|
40 | + $this->msg=$str; |
|
41 | + } |
|
42 | + } |
|
43 | 43 | |
44 | 44 | |
45 | 45 | |
46 | - private function convert($method='msg') { |
|
47 | - if ($method == 'msg' || $method == 'all') { |
|
48 | - $this->msg=$this->setPinyin($this->msg); |
|
49 | - $this->msg=$this->setRepeat($this->msg); |
|
50 | - //$this->msg = $this->GbToBig($this->msg); |
|
51 | - $this->msg=$this->setBlankness($this->msg); |
|
46 | + private function convert($method='msg') { |
|
47 | + if ($method == 'msg' || $method == 'all') { |
|
48 | + $this->msg=$this->setPinyin($this->msg); |
|
49 | + $this->msg=$this->setRepeat($this->msg); |
|
50 | + //$this->msg = $this->GbToBig($this->msg); |
|
51 | + $this->msg=$this->setBlankness($this->msg); |
|
52 | 52 | |
53 | - } |
|
54 | - if ($method == 'url' || $method == 'all') { |
|
55 | - $this->url=$this->setChacha($this->url); |
|
56 | - } |
|
57 | - $this->msg=$this->prefix.str_replace('%%%%', $this->url, $this->msg); |
|
58 | - } |
|
53 | + } |
|
54 | + if ($method == 'url' || $method == 'all') { |
|
55 | + $this->url=$this->setChacha($this->url); |
|
56 | + } |
|
57 | + $this->msg=$this->prefix.str_replace('%%%%', $this->url, $this->msg); |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * @param string $url |
|
62 | - */ |
|
63 | - function setChacha($url) { |
|
64 | - $url=strtolower($url); |
|
65 | - $arr=array( |
|
66 | - 'a' => array('a', 'A', 'a', 'A', 'Α', 'А', 'α'), |
|
67 | - 'b' => array('b', 'B', 'b', 'B', 'Β', 'В', 'Ь'), |
|
68 | - 'c' => array('c', 'C', 'c', 'C', 'С', 'с'), |
|
69 | - 'd' => array('d', 'D', 'd', 'D'), |
|
70 | - 'e' => array('e', 'E', 'e', 'E', 'Ε', 'Е', 'е'), |
|
71 | - 'f' => array('f', 'F', 'f', 'F'), |
|
72 | - 'g' => array('g', 'G', 'g', 'G'), |
|
73 | - 'h' => array('h', 'H', 'h', 'H', 'Η', 'Н', 'н'), |
|
74 | - 'i' => array('i', 'I', 'i', 'I', 'Ι', 'Ⅰ'), |
|
75 | - 'j' => array('j', 'J', 'j', 'J'), |
|
76 | - 'k' => array('k', 'K', 'k', 'K', 'Κ', 'κ', 'к', 'К'), |
|
77 | - 'l' => array('l', 'L', 'l', 'L', '︱', '︳', '|'), |
|
78 | - 'm' => array('m', 'M', 'm', 'M', 'Μ', 'М', 'м'), |
|
79 | - 'n' => array('n', 'N', 'n', 'N', 'Ν', '∩'), |
|
80 | - 'o' => array('o', 'O', 'o', 'O', 'Ο', 'О'), |
|
81 | - 'p' => array('p', 'P', 'p', 'P', 'Ρ', 'Р', 'р'), |
|
82 | - 'q' => array('q', 'Q', 'q', 'Q'), |
|
83 | - 'r' => array('r', 'R', 'r', 'R'), |
|
84 | - 's' => array('s', 'S', 's', 'S'), |
|
85 | - 't' => array('t', 'T', 't', 'T', 'Τ', 'Т', 'ㄒ'), |
|
86 | - 'u' => array('u', 'U', 'u', 'U', '∪'), |
|
87 | - 'v' => array('v', 'V', 'v', 'V', '∨', 'ν'), |
|
88 | - 'w' => array('w', 'W', 'w', 'W'), |
|
89 | - 'x' => array('x', 'X', 'x', 'X', 'Χ', 'χ', 'Х', 'х', 'Ⅹ', '×'), |
|
90 | - 'y' => array('y', 'Y', 'y', 'Y', 'У'), |
|
91 | - 'z' => array('z', 'Z', 'z', 'Z', 'Ζ'), |
|
60 | + /** |
|
61 | + * @param string $url |
|
62 | + */ |
|
63 | + function setChacha($url) { |
|
64 | + $url=strtolower($url); |
|
65 | + $arr=array( |
|
66 | + 'a' => array('a', 'A', 'a', 'A', 'Α', 'А', 'α'), |
|
67 | + 'b' => array('b', 'B', 'b', 'B', 'Β', 'В', 'Ь'), |
|
68 | + 'c' => array('c', 'C', 'c', 'C', 'С', 'с'), |
|
69 | + 'd' => array('d', 'D', 'd', 'D'), |
|
70 | + 'e' => array('e', 'E', 'e', 'E', 'Ε', 'Е', 'е'), |
|
71 | + 'f' => array('f', 'F', 'f', 'F'), |
|
72 | + 'g' => array('g', 'G', 'g', 'G'), |
|
73 | + 'h' => array('h', 'H', 'h', 'H', 'Η', 'Н', 'н'), |
|
74 | + 'i' => array('i', 'I', 'i', 'I', 'Ι', 'Ⅰ'), |
|
75 | + 'j' => array('j', 'J', 'j', 'J'), |
|
76 | + 'k' => array('k', 'K', 'k', 'K', 'Κ', 'κ', 'к', 'К'), |
|
77 | + 'l' => array('l', 'L', 'l', 'L', '︱', '︳', '|'), |
|
78 | + 'm' => array('m', 'M', 'm', 'M', 'Μ', 'М', 'м'), |
|
79 | + 'n' => array('n', 'N', 'n', 'N', 'Ν', '∩'), |
|
80 | + 'o' => array('o', 'O', 'o', 'O', 'Ο', 'О'), |
|
81 | + 'p' => array('p', 'P', 'p', 'P', 'Ρ', 'Р', 'р'), |
|
82 | + 'q' => array('q', 'Q', 'q', 'Q'), |
|
83 | + 'r' => array('r', 'R', 'r', 'R'), |
|
84 | + 's' => array('s', 'S', 's', 'S'), |
|
85 | + 't' => array('t', 'T', 't', 'T', 'Τ', 'Т', 'ㄒ'), |
|
86 | + 'u' => array('u', 'U', 'u', 'U', '∪'), |
|
87 | + 'v' => array('v', 'V', 'v', 'V', '∨', 'ν'), |
|
88 | + 'w' => array('w', 'W', 'w', 'W'), |
|
89 | + 'x' => array('x', 'X', 'x', 'X', 'Χ', 'χ', 'Х', 'х', 'Ⅹ', '×'), |
|
90 | + 'y' => array('y', 'Y', 'y', 'Y', 'У'), |
|
91 | + 'z' => array('z', 'Z', 'z', 'Z', 'Ζ'), |
|
92 | 92 | |
93 | - '1' => array('1', '1'), |
|
94 | - '2' => array('2', '2'), |
|
95 | - '3' => array('3', '3'), |
|
96 | - '4' => array('4', '4'), |
|
97 | - '5' => array('5', '5'), |
|
98 | - '6' => array('6', '6'), |
|
99 | - '7' => array('7', '7'), |
|
100 | - '8' => array('8', '8'), |
|
101 | - '9' => array('9', '9'), |
|
102 | - '0' => array('0', '0'), |
|
93 | + '1' => array('1', '1'), |
|
94 | + '2' => array('2', '2'), |
|
95 | + '3' => array('3', '3'), |
|
96 | + '4' => array('4', '4'), |
|
97 | + '5' => array('5', '5'), |
|
98 | + '6' => array('6', '6'), |
|
99 | + '7' => array('7', '7'), |
|
100 | + '8' => array('8', '8'), |
|
101 | + '9' => array('9', '9'), |
|
102 | + '0' => array('0', '0'), |
|
103 | 103 | |
104 | - ':' => array(':', ':', '∶'), |
|
105 | - '/' => array('/', '/'), |
|
106 | - '.' => array('。', '·', '.', '、', '﹒', ',', '丶') |
|
104 | + ':' => array(':', ':', '∶'), |
|
105 | + '/' => array('/', '/'), |
|
106 | + '.' => array('。', '·', '.', '、', '﹒', ',', '丶') |
|
107 | 107 | |
108 | - ); |
|
109 | - $len=strlen($url); |
|
110 | - $temp="\n\n"; |
|
111 | - for ($i=0; $i < $len; $i++) { |
|
112 | - $t_str=substr($url, $i, 1); |
|
113 | - $sj=mt_rand(0, count($arr[$t_str]) - 1); |
|
114 | - $temp.=$arr[$t_str][$sj]; |
|
115 | - } |
|
116 | - return $temp; |
|
117 | - } |
|
108 | + ); |
|
109 | + $len=strlen($url); |
|
110 | + $temp="\n\n"; |
|
111 | + for ($i=0; $i < $len; $i++) { |
|
112 | + $t_str=substr($url, $i, 1); |
|
113 | + $sj=mt_rand(0, count($arr[$t_str]) - 1); |
|
114 | + $temp.=$arr[$t_str][$sj]; |
|
115 | + } |
|
116 | + return $temp; |
|
117 | + } |
|
118 | 118 | |
119 | - //随机把一个字符转为拼音 |
|
119 | + //随机把一个字符转为拼音 |
|
120 | 120 | |
121 | - /** |
|
122 | - * @param string $str |
|
123 | - */ |
|
124 | - function setPinyin($str) { |
|
125 | - $py = mt_rand(0, iconv_strlen( $str, 'UTF-8' )-1); |
|
126 | - $t_str = iconv_substr( $str, $py, 1, 'UTF-8'); |
|
127 | - if(mt_rand(0,10) > 5) { |
|
128 | - $pinyin = " "; |
|
129 | - } |
|
130 | - $pinyin = $this->_pinyin->convert($t_str,PINYIN_UNICODE); |
|
121 | + /** |
|
122 | + * @param string $str |
|
123 | + */ |
|
124 | + function setPinyin($str) { |
|
125 | + $py = mt_rand(0, iconv_strlen( $str, 'UTF-8' )-1); |
|
126 | + $t_str = iconv_substr( $str, $py, 1, 'UTF-8'); |
|
127 | + if(mt_rand(0,10) > 5) { |
|
128 | + $pinyin = " "; |
|
129 | + } |
|
130 | + $pinyin = $this->_pinyin->convert($t_str,PINYIN_UNICODE); |
|
131 | 131 | $pinyin=implode(" ",$pinyin); |
132 | - if(mt_rand(0,10) > 5) { |
|
133 | - $pinyin .= " "; |
|
134 | - } |
|
135 | - if($t_str != "%"){ |
|
136 | - $str = preg_replace("'$t_str'", $pinyin, $str, 1); |
|
137 | - } |
|
138 | - return $str; |
|
139 | - } |
|
132 | + if(mt_rand(0,10) > 5) { |
|
133 | + $pinyin .= " "; |
|
134 | + } |
|
135 | + if($t_str != "%"){ |
|
136 | + $str = preg_replace("'$t_str'", $pinyin, $str, 1); |
|
137 | + } |
|
138 | + return $str; |
|
139 | + } |
|
140 | 140 | |
141 | - //随机重复一个字符 |
|
141 | + //随机重复一个字符 |
|
142 | 142 | |
143 | - /** |
|
144 | - * @param string $str |
|
145 | - */ |
|
146 | - function setRepeat($str) { |
|
147 | - $len = iconv_strlen( $str, 'UTF-8' ); |
|
148 | - $action = 0; |
|
149 | - $temp = ''; |
|
150 | - for( $i=0; $i<$len; $i++ ){ |
|
151 | - $t_str = iconv_substr( $str, $i, 1 ,'UTF-8'); |
|
152 | - if( mt_rand( 1, 50 ) > 48 && $action == 0) { |
|
153 | - if(!preg_match("@[a-z0-9%\\s]+@i", $t_str)) { |
|
154 | - $temp .= $t_str; |
|
155 | - $action = 1; |
|
156 | - } |
|
157 | - } |
|
158 | - $temp .= $t_str; |
|
159 | - } |
|
160 | - return $temp; |
|
161 | - } |
|
143 | + /** |
|
144 | + * @param string $str |
|
145 | + */ |
|
146 | + function setRepeat($str) { |
|
147 | + $len = iconv_strlen( $str, 'UTF-8' ); |
|
148 | + $action = 0; |
|
149 | + $temp = ''; |
|
150 | + for( $i=0; $i<$len; $i++ ){ |
|
151 | + $t_str = iconv_substr( $str, $i, 1 ,'UTF-8'); |
|
152 | + if( mt_rand( 1, 50 ) > 48 && $action == 0) { |
|
153 | + if(!preg_match("@[a-z0-9%\\s]+@i", $t_str)) { |
|
154 | + $temp .= $t_str; |
|
155 | + $action = 1; |
|
156 | + } |
|
157 | + } |
|
158 | + $temp .= $t_str; |
|
159 | + } |
|
160 | + return $temp; |
|
161 | + } |
|
162 | 162 | |
163 | - //随机插入不影响阅读的字符 |
|
163 | + //随机插入不影响阅读的字符 |
|
164 | 164 | |
165 | - /** |
|
166 | - * @param string $str |
|
167 | - */ |
|
168 | - function setBlankness($str) { |
|
169 | - $blankness=array(" ", ' ', '҉', '̅̅', '̲', '̲̲', '̅', '̲̲̅̅'); |
|
170 | - $len=iconv_strlen($str, 'UTF-8'); |
|
171 | - $temp=''; |
|
172 | - for ($i=0; $i < $len; $i++) { |
|
173 | - $t_str=iconv_substr($str, $i, 1, 'UTF-8'); |
|
174 | - if (mt_rand(1, 50) > 48) { |
|
175 | - if (!preg_match("@[a-z0-9%\\s]+@i", $t_str)) { |
|
176 | - $temp.=$blankness[mt_rand(0, 7)]; |
|
177 | - } |
|
178 | - } |
|
179 | - $temp.=$t_str; |
|
180 | - } |
|
181 | - return $temp; |
|
182 | - } |
|
165 | + /** |
|
166 | + * @param string $str |
|
167 | + */ |
|
168 | + function setBlankness($str) { |
|
169 | + $blankness=array(" ", ' ', '҉', '̅̅', '̲', '̲̲', '̅', '̲̲̅̅'); |
|
170 | + $len=iconv_strlen($str, 'UTF-8'); |
|
171 | + $temp=''; |
|
172 | + for ($i=0; $i < $len; $i++) { |
|
173 | + $t_str=iconv_substr($str, $i, 1, 'UTF-8'); |
|
174 | + if (mt_rand(1, 50) > 48) { |
|
175 | + if (!preg_match("@[a-z0-9%\\s]+@i", $t_str)) { |
|
176 | + $temp.=$blankness[mt_rand(0, 7)]; |
|
177 | + } |
|
178 | + } |
|
179 | + $temp.=$t_str; |
|
180 | + } |
|
181 | + return $temp; |
|
182 | + } |
|
183 | 183 | |
184 | - //随机进行繁体中文转换 |
|
185 | - function GbToBig($str) { |
|
186 | - $len=iconv_strlen($str, 'UTF-8'); |
|
187 | - $temp=''; |
|
188 | - for ($i=0; $i < $len; $i++) { |
|
189 | - $t_str=iconv_substr($str, $i, 1, 'UTF-8'); |
|
190 | - if (mt_rand(1, 50) > 48) { |
|
191 | - $t_str=strtr($t_str, $this->GbToBigArray); |
|
192 | - } |
|
193 | - $temp.=$t_str; |
|
194 | - } |
|
195 | - return $temp; |
|
196 | - } |
|
184 | + //随机进行繁体中文转换 |
|
185 | + function GbToBig($str) { |
|
186 | + $len=iconv_strlen($str, 'UTF-8'); |
|
187 | + $temp=''; |
|
188 | + for ($i=0; $i < $len; $i++) { |
|
189 | + $t_str=iconv_substr($str, $i, 1, 'UTF-8'); |
|
190 | + if (mt_rand(1, 50) > 48) { |
|
191 | + $t_str=strtr($t_str, $this->GbToBigArray); |
|
192 | + } |
|
193 | + $temp.=$t_str; |
|
194 | + } |
|
195 | + return $temp; |
|
196 | + } |
|
197 | 197 | } |
198 | 198 | |
199 | 199 |
@@ -122,18 +122,18 @@ discard block |
||
122 | 122 | * @param string $str |
123 | 123 | */ |
124 | 124 | function setPinyin($str) { |
125 | - $py = mt_rand(0, iconv_strlen( $str, 'UTF-8' )-1); |
|
126 | - $t_str = iconv_substr( $str, $py, 1, 'UTF-8'); |
|
127 | - if(mt_rand(0,10) > 5) { |
|
128 | - $pinyin = " "; |
|
125 | + $py=mt_rand(0, iconv_strlen($str, 'UTF-8') - 1); |
|
126 | + $t_str=iconv_substr($str, $py, 1, 'UTF-8'); |
|
127 | + if (mt_rand(0, 10) > 5) { |
|
128 | + $pinyin=" "; |
|
129 | 129 | } |
130 | - $pinyin = $this->_pinyin->convert($t_str,PINYIN_UNICODE); |
|
131 | - $pinyin=implode(" ",$pinyin); |
|
132 | - if(mt_rand(0,10) > 5) { |
|
133 | - $pinyin .= " "; |
|
130 | + $pinyin=$this->_pinyin->convert($t_str, PINYIN_UNICODE); |
|
131 | + $pinyin=implode(" ", $pinyin); |
|
132 | + if (mt_rand(0, 10) > 5) { |
|
133 | + $pinyin.=" "; |
|
134 | 134 | } |
135 | - if($t_str != "%"){ |
|
136 | - $str = preg_replace("'$t_str'", $pinyin, $str, 1); |
|
135 | + if ($t_str != "%") { |
|
136 | + $str=preg_replace("'$t_str'", $pinyin, $str, 1); |
|
137 | 137 | } |
138 | 138 | return $str; |
139 | 139 | } |
@@ -144,18 +144,18 @@ discard block |
||
144 | 144 | * @param string $str |
145 | 145 | */ |
146 | 146 | function setRepeat($str) { |
147 | - $len = iconv_strlen( $str, 'UTF-8' ); |
|
148 | - $action = 0; |
|
149 | - $temp = ''; |
|
150 | - for( $i=0; $i<$len; $i++ ){ |
|
151 | - $t_str = iconv_substr( $str, $i, 1 ,'UTF-8'); |
|
152 | - if( mt_rand( 1, 50 ) > 48 && $action == 0) { |
|
153 | - if(!preg_match("@[a-z0-9%\\s]+@i", $t_str)) { |
|
154 | - $temp .= $t_str; |
|
155 | - $action = 1; |
|
147 | + $len=iconv_strlen($str, 'UTF-8'); |
|
148 | + $action=0; |
|
149 | + $temp=''; |
|
150 | + for ($i=0; $i < $len; $i++) { |
|
151 | + $t_str=iconv_substr($str, $i, 1, 'UTF-8'); |
|
152 | + if (mt_rand(1, 50) > 48 && $action == 0) { |
|
153 | + if (!preg_match("@[a-z0-9%\\s]+@i", $t_str)) { |
|
154 | + $temp.=$t_str; |
|
155 | + $action=1; |
|
156 | 156 | } |
157 | 157 | } |
158 | - $temp .= $t_str; |
|
158 | + $temp.=$t_str; |
|
159 | 159 | } |
160 | 160 | return $temp; |
161 | 161 | } |
@@ -17,8 +17,8 @@ |
||
17 | 17 | */ |
18 | 18 | private function initContainer() { |
19 | 19 | static::setInstance($this); |
20 | - $this->instance('app',$this); |
|
21 | - $this->bind('pinyin','\puck\helpers\PinYin'); |
|
20 | + $this->instance('app', $this); |
|
21 | + $this->bind('pinyin', '\puck\helpers\PinYin'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | } |
25 | 25 | \ No newline at end of file |