Skip to content

Commit 7d00be6

Browse files
authored
Merge pull request #3 from reallyli/analysis-X04eRm
Apply fixes from StyleCI
2 parents ab117d5 + d7f5ba6 commit 7d00be6

File tree

6 files changed

+20
-19
lines changed

6 files changed

+20
-19
lines changed

config/unicomponent.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
'log_formatter' => [
2020
'provider' => \Reallyli\LaravelUnicomponent\Components\LogFormatter\LogFormatterService::class,
21-
'configs' => []
21+
'configs' => [],
2222
],
2323
/*
2424
|--------------------------------------------------------------------------
@@ -32,7 +32,7 @@
3232
'provider' => \Reallyli\LaravelUnicomponent\Components\Pusher\PusherService::class,
3333
'configs' => [
3434
'pusher_url' => env('UNICOMPONENT_PUSHER_URL'),
35-
]
36-
]
37-
]
35+
],
36+
],
37+
],
3838
];

src/Components/Pusher/Pusher.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
* Created by PhpStorm.
44
* User: uniqueway
55
* Date: 2018/11/20
6-
* Time: 上午11:39
6+
* Time: 上午11:39.
77
*/
88

99
namespace Reallyli\LaravelUnicomponent\Components\Pusher;
1010

1111
class Pusher
1212
{
1313
/**
14-
* trigger
14+
* trigger.
1515
*
1616
* @author reallyli <[email protected]>
1717
* @since 2018/11/20
@@ -31,7 +31,7 @@ public function trigger($channels, string $eventName, array $data, array $params
3131
}
3232

3333
/**
34-
* Send Request
34+
* Send Request.
3535
*
3636
* @author reallyli <[email protected]>
3737
* @since 2018/11/20
@@ -56,16 +56,17 @@ protected function sendRequest(string $url, array $data)
5656

5757
$response = curl_exec($ch);
5858

59-
if ($response === FALSE) {
60-
logger()->error('[LaravelUnicomponent] Pusher Send Request Error, data:' . json_encode($data));
59+
if ($response === false) {
60+
logger()->error('[LaravelUnicomponent] Pusher Send Request Error, data:'.json_encode($data));
61+
6162
return false;
6263
}
6364

6465
return $response;
6566
}
6667

6768
/**
68-
* Get Pusher Url
69+
* Get Pusher Url.
6970
*
7071
* @author reallyli <[email protected]>
7172
* @since 2018/11/20
@@ -75,8 +76,8 @@ protected function getPusherUrl()
7576
{
7677
$pusherUrl = config('unicomponent.pusher.configs.pusher_url');
7778

78-
throw_unless(filter_var($pusherUrl, FILTER_VALIDATE_URL), '\Exception','pusher url illegal');
79+
throw_unless(filter_var($pusherUrl, FILTER_VALIDATE_URL), '\Exception', 'pusher url illegal');
7980

8081
return $pusherUrl;
8182
}
82-
}
83+
}

src/Components/Pusher/PusherService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Created by PhpStorm.
44
* User: uniqueway
55
* Date: 2018/11/20
6-
* Time: 上午11:38
6+
* Time: 上午11:38.
77
*/
88

99
namespace Reallyli\LaravelUnicomponent\Components\Pusher;
@@ -21,4 +21,4 @@ public function provider()
2121
{
2222
return Pusher::class;
2323
}
24-
}
24+
}

src/UnicomponentServiceManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class UnicomponentServiceManager
2121
private $config;
2222

2323
/**
24-
* Construct
24+
* Construct.
2525
*
2626
* @author reallyli <[email protected]>
2727
* @since 18/10/11
@@ -132,7 +132,7 @@ public function __call(string $method, array $parameters)
132132
}
133133

134134
/**
135-
* Method description:__get
135+
* Method description:__get.
136136
*
137137
* @author reallyli <[email protected]>
138138
* @since 2018/11/20

tests/UnicomponentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testConfigurationComponents()
5858
*/
5959
public function testGetComponent()
6060
{
61-
$unicompoentConfig = include_once __DIR__ . '/../config/unicomponent.php';
61+
$unicompoentConfig = include_once __DIR__.'/../config/unicomponent.php';
6262

6363
$unicomponentServiceManager = new UnicomponentServiceManager($unicompoentConfig);
6464

tests/unicomponentConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'components' => [
1111
'example' => [
1212
'provider' => \Reallyli\LaravelUnicomponent\Tests\Example\ExampleService::class,
13-
'configs' => []
14-
]
13+
'configs' => [],
14+
],
1515
],
1616
];

0 commit comments

Comments
 (0)