@@ -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(); |
@@ -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 |