Skip to content

Commit ba3d47a

Browse files
aarondfrancisStyleCIBot
authored andcommitted
Apply fixes from StyleCI
[ci skip] [skip ci]
1 parent 00073ae commit ba3d47a

15 files changed

+51
-74
lines changed

src/Blade/BladeManager.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55

66
namespace Torchlight\Blade;
77

8+
use Illuminate\Http\Response;
89
use Torchlight\Block;
910
use Torchlight\Client;
10-
use Illuminate\Http\Response;
11-
use Illuminate\Support\Str;
1211

1312
class BladeManager
1413
{

src/Blade/CodeComponent.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55

66
namespace Torchlight\Blade;
77

8-
use Torchlight\Block;
98
use Illuminate\View\Component;
10-
use Torchlight\Blade\BladeManager;
9+
use Torchlight\Block;
1110

1211
class CodeComponent extends Component
1312
{
@@ -34,7 +33,6 @@ public function __construct($language, $theme = null, $contents = null, $torchli
3433
$this->contents = $contents;
3534

3635
$this->block = Block::make($torchlightId)->language($this->language)->theme($this->theme);
37-
3836
}
3937

4038
public function capture($contents)
@@ -43,7 +41,7 @@ public function capture($contents)
4341

4442
if (is_file($contents)) {
4543
$contents = file_get_contents($contents);
46-
} else if (is_file(resource_path($contents))) {
44+
} elseif (is_file(resource_path($contents))) {
4745
$contents = file_get_contents(resource_path($contents));
4846
}
4947

@@ -69,6 +67,5 @@ public function render()
6967
])
7068
}}><?php ob_start(); ?>{{ $slot }}<?php $capture(ob_get_clean()) ?>{{ $block->placeholder() }}</code>
7169
EOT;
72-
7370
}
7471
}

src/Client.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55

66
namespace Torchlight;
77

8-
use Torchlight\Exceptions\ConfigurationException;
9-
use Torchlight\Exceptions\RequestException;
10-
use Torchlight\Exceptions\TorchlightException;
11-
use Illuminate\Http\Client\Response;
128
use Illuminate\Support\Arr;
139
use Illuminate\Support\Collection;
1410
use Illuminate\Support\Facades\Cache;
1511
use Illuminate\Support\Facades\Http;
12+
use Torchlight\Exceptions\ConfigurationException;
13+
use Torchlight\Exceptions\RequestException;
14+
use Torchlight\Exceptions\TorchlightException;
1615

1716
class Client
1817
{
@@ -141,7 +140,7 @@ protected function setCacheFromBlocks(Collection $blocks, Collection $ids)
141140
{
142141
$keys = $this->applyDirectlyFromResponse();
143142

144-
$blocks->only($ids)->each(function (Block $block) use ($ids, $keys) {
143+
$blocks->only($ids)->each(function (Block $block) use ($keys) {
145144
$value = [];
146145

147146
foreach ($keys as $key) {
@@ -196,6 +195,6 @@ protected function defaultHighlighted(Block $block)
196195
*/
197196
protected function defaultWrapped(Block $block)
198197
{
199-
return "<pre><code class='torchlight'>" . $this->defaultHighlighted($block) . "</code></pre>";
198+
return "<pre><code class='torchlight'>" . $this->defaultHighlighted($block) . '</code></pre>';
200199
}
201200
}

src/Commands/Install.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55

66
namespace Torchlight\Commands;
77

8-
use Hammerstone\Airdrop\AirdropServiceProvider;
9-
use Torchlight\TorchlightServiceProvider;
108
use Illuminate\Console\Command;
119
use Illuminate\Support\Facades\Artisan;
10+
use Torchlight\TorchlightServiceProvider;
1211

1312
class Install extends Command
1413
{
@@ -38,11 +37,10 @@ public function __construct()
3837
*/
3938
public function handle()
4039
{
41-
Artisan::call("vendor:publish", [
40+
Artisan::call('vendor:publish', [
4241
'--provider' => TorchlightServiceProvider::class
4342
]);
4443

4544
$this->info('Config file published!');
4645
}
47-
4846
}

src/Exceptions/ConfigurationException.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
namespace Torchlight\Exceptions;
77

8-
98
class ConfigurationException extends TorchlightException
109
{
11-
1210
}

src/Exceptions/RequestException.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
namespace Torchlight\Exceptions;
77

8-
98
class RequestException extends TorchlightException
109
{
11-
1210
}

src/Exceptions/TorchlightException.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@
77

88
class TorchlightException extends \Exception
99
{
10-
1110
}

src/Manager.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
use Illuminate\Contracts\Cache\Repository;
99
use Illuminate\Contracts\Container\Container;
10+
use Illuminate\Support\Facades\Cache;
1011
use Illuminate\Support\Str;
1112
use Illuminate\Support\Traits\Macroable;
12-
use Illuminate\Support\Facades\Cache;
1313

1414
class Manager
1515
{
@@ -112,5 +112,4 @@ public function cache()
112112
// If the config value is null, the default cache will be used.
113113
return Cache::store($this->config('cache'));
114114
}
115-
116115
}

src/Middleware/RenderTorchlight.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace Torchlight\Middleware;
44

55
use Closure;
6-
use Torchlight\Blade\BladeManager;
76
use Illuminate\Http\Request;
87
use Illuminate\Http\Response;
98
use Illuminate\Support\Str;
9+
use Torchlight\Blade\BladeManager;
1010

1111
class RenderTorchlight
1212
{

src/TorchlightServiceProvider.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
namespace Torchlight;
77

8+
use Illuminate\Support\ServiceProvider;
89
use Torchlight\Blade\CodeComponent;
910
use Torchlight\Commands\Install;
10-
use Illuminate\Support\ServiceProvider;
1111

1212
class TorchlightServiceProvider extends ServiceProvider
1313
{
@@ -36,5 +36,4 @@ public function register()
3636
{
3737
$this->mergeConfigFrom(__DIR__ . '/../config/torchlight.php', 'torchlight');
3838
}
39-
4039
}

0 commit comments

Comments
 (0)