mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
Merge pull request #414 from top-think/analysis-q5kY3W
Apply fixes from StyleCI
This commit is contained in:
@@ -174,7 +174,7 @@ class Debug
|
|||||||
$output = '<pre>' . $label . $output . '</pre>';
|
$output = '<pre>' . $label . $output . '</pre>';
|
||||||
}
|
}
|
||||||
if ($echo) {
|
if ($echo) {
|
||||||
echo ($output);
|
echo($output);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
return $output;
|
return $output;
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ class Session
|
|||||||
self::delete($name, $prefix);
|
self::delete($name, $prefix);
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ class Url
|
|||||||
$domain .= $rootDomain;
|
$domain .= $rootDomain;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} else if (false !== strpos($key, '*')) {
|
} elseif (false !== strpos($key, '*')) {
|
||||||
if (!empty($rootDomain)) {
|
if (!empty($rootDomain)) {
|
||||||
$domain .= $rootDomain;
|
$domain .= $rootDomain;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ class Bootstrap extends Paginator
|
|||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 渲染分页html
|
* 渲染分页html
|
||||||
* @return mixed
|
* @return mixed
|
||||||
@@ -127,7 +126,6 @@ class Bootstrap extends Paginator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成一个可点击的按钮
|
* 生成一个可点击的按钮
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ abstract class Pipes
|
|||||||
*/
|
*/
|
||||||
abstract public function areOpen();
|
abstract public function areOpen();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
namespace tests\thinkphp\library\think;
|
namespace tests\thinkphp\library\think;
|
||||||
|
|
||||||
use ReflectionClass;
|
|
||||||
use think\App;
|
use think\App;
|
||||||
use think\Config;
|
use think\Config;
|
||||||
use think\Request;
|
use think\Request;
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ namespace tests\thinkphp\library\think\behavior;
|
|||||||
|
|
||||||
class One
|
class One
|
||||||
{
|
{
|
||||||
public function run(&$data){
|
public function run(&$data) {
|
||||||
$data['id'] = 1;
|
$data['id'] = 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test(&$data){
|
public function test(&$data) {
|
||||||
$data['name'] = 'test';
|
$data['name'] = 'test';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ namespace tests\thinkphp\library\think\behavior;
|
|||||||
|
|
||||||
class Three
|
class Three
|
||||||
{
|
{
|
||||||
public function run(&$data){
|
public function run(&$data) {
|
||||||
$data['id'] = 3;
|
$data['id'] = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ namespace tests\thinkphp\library\think\behavior;
|
|||||||
|
|
||||||
class Two
|
class Two
|
||||||
{
|
{
|
||||||
public function run(&$data){
|
public function run(&$data) {
|
||||||
$data['id'] = 2;
|
$data['id'] = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
namespace tests\thinkphp\library\think;
|
namespace tests\thinkphp\library\think;
|
||||||
|
|
||||||
use \think\Db;
|
use think\Db;
|
||||||
|
|
||||||
class dbTest extends \PHPUnit_Framework_TestCase
|
class dbTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
@@ -349,5 +349,4 @@ EOF;
|
|||||||
$this->assertNotEquals($cache, $updateCache);
|
$this->assertNotEquals($cache, $updateCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ class debugTest extends \PHPUnit_Framework_TestCase
|
|||||||
$array = explode("array", json_encode($output));
|
$array = explode("array", json_encode($output));
|
||||||
if (IS_WIN) {
|
if (IS_WIN) {
|
||||||
$this->assertEquals("(1) {\\n [\\\"key\\\"] => string(3) \\\"val\\\"\\n}\\n\\r\\n\"", end($array));
|
$this->assertEquals("(1) {\\n [\\\"key\\\"] => string(3) \\\"val\\\"\\n}\\n\\r\\n\"", end($array));
|
||||||
} else if (strstr(PHP_OS, 'Darwin')) {
|
} elseif (strstr(PHP_OS, 'Darwin')) {
|
||||||
$this->assertEquals("(1) {\\n [\\\"key\\\"] => string(3) \\\"val\\\"\\n}\\n\\n\"", end($array));
|
$this->assertEquals("(1) {\\n [\\\"key\\\"] => string(3) \\\"val\\\"\\n}\\n\\n\"", end($array));
|
||||||
} else {
|
} else {
|
||||||
$this->assertEquals("(1) {\\n 'key' =>\\n string(3) \\\"val\\\"\\n}\\n\\n\"", end($array));
|
$this->assertEquals("(1) {\\n 'key' =>\\n string(3) \\\"val\\\"\\n}\\n\\n\"", end($array));
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
namespace tests\thinkphp\library\think;
|
namespace tests\thinkphp\library\think;
|
||||||
|
|
||||||
|
|
||||||
use think\paginator\driver\Bootstrap;
|
use think\paginator\driver\Bootstrap;
|
||||||
|
|
||||||
class paginateTest extends \PHPUnit_Framework_TestCase
|
class paginateTest extends \PHPUnit_Framework_TestCase
|
||||||
@@ -38,7 +37,4 @@ class paginateTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($render, $p->render());
|
$this->assertEquals($render, $p->render());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,7 @@ namespace tests\thinkphp\library\think\tempplate\taglib;
|
|||||||
use think\Template;
|
use think\Template;
|
||||||
use think\template\taglib\Cx;
|
use think\template\taglib\Cx;
|
||||||
|
|
||||||
class templateTest extends \PHPUnit_Framework_TestCase
|
class cxTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function testPhp()
|
public function testPhp()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user