Skip to content

Commit 118f6e4

Browse files
chore(style): fix code style
1 parent a07cd38 commit 118f6e4

24 files changed

+321
-451
lines changed

src/Components/Image.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ class Image extends Component
1717
/**
1818
* Create the component instance.
1919
*
20-
* @param string $type
21-
* @param string $message
22-
* @return void
20+
* @param string $type
21+
* @param string $message
22+
* @param mixed $src
23+
* @param mixed $absolutePath
2324
*/
2425
public function __construct($src, $absolutePath = true)
2526
{

src/Components/PageTitle.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,24 @@ class PageTitle extends Component
1717
/**
1818
* Create the component instance.
1919
*
20-
* @param string $type
21-
* @param string $message
22-
* @return void
20+
* @param string $type
21+
* @param string $message
22+
* @param null|mixed $title
23+
* @param mixed $withAppName
24+
* @param mixed $separator
25+
* @param mixed $invert
2326
*/
2427
public function __construct($title = null, $withAppName = true, $separator = '-', $invert = false)
2528
{
2629
if (View::hasSection('title')) {
2730
$title = View::getSection('title');
2831
}
2932

30-
if (! empty($title) && $withAppName) {
33+
if (!empty($title) && $withAppName) {
3134
if ($invert) {
32-
$this->title = $title . " " . trim(e($separator)) . " " . config('app.name');
35+
$this->title = $title.' '.trim(e($separator)).' '.config('app.name');
3336
} else {
34-
$this->title = config('app.name') . " " . trim(e($separator)) . " " . $title;
37+
$this->title = config('app.name').' '.trim(e($separator)).' '.$title;
3538
}
3639
} else {
3740
$this->title = config('app.name');

src/Components/Script.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ class Script extends Component
1717
/**
1818
* Create the component instance.
1919
*
20-
* @param string $type
21-
* @param string $message
22-
* @return void
20+
* @param string $type
21+
* @param string $message
22+
* @param null|mixed $src
23+
* @param mixed $absolutePath
2324
*/
2425
public function __construct($src = null, $absolutePath = true)
2526
{
26-
if (! is_null($src)) {
27+
if (!is_null($src)) {
2728
$this->source = ThemesManager::asset($src, $absolutePath);
2829
} else {
2930
$this->source = null;

src/Components/Style.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ class Style extends Component
1717
/**
1818
* Create the component instance.
1919
*
20-
* @param string $type
21-
* @param string $message
22-
* @return void
20+
* @param string $type
21+
* @param string $message
22+
* @param mixed $src
23+
* @param mixed $absolutePath
2324
*/
2425
public function __construct($src, $absolutePath = true)
2526
{
26-
if (! is_null($src)) {
27+
if (!is_null($src)) {
2728
$this->source = ThemesManager::asset($src, $absolutePath);
2829
} else {
2930
$this->source = null;

src/Console/Commands/AbstractCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ protected function validateName()
2121
$name = $this->argument('name');
2222

2323
$this->theme = \Theme::get($name);
24-
if (! $this->theme) {
25-
$this->error("Theme with name ${name} does not exists!");
24+
if (!$this->theme) {
25+
$this->error("Theme with name {$name} does not exists!");
26+
2627
exit();
2728
}
2829
}

src/Console/Commands/ActivateTheme.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,14 @@ class ActivateTheme extends AbstractCommand
2020

2121
/**
2222
* Create a new command instance.
23-
*
24-
* @return void
2523
*/
2624
public function __construct()
2725
{
2826
parent::__construct();
2927
}
3028

3129
/**
32-
* Prompt for module's alias name
33-
*
30+
* Prompt for module's alias name.
3431
*/
3532
public function handle()
3633
{

src/Console/Commands/Cache.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,21 @@ class Cache extends AbstractCommand
2222

2323
/**
2424
* Create a new command instance.
25-
*
26-
* @return void
2725
*/
2826
public function __construct()
2927
{
3028
parent::__construct();
3129
}
3230

3331
/**
34-
* Prompt for module's alias name
35-
*
32+
* Prompt for module's alias name.
3633
*/
3734
public function handle()
3835
{
3936
if (ThemesManager::buildCache()) {
4037
$this->sectionMessage('Themes Manager', 'Themes cache created succefully');
4138
} else {
42-
$this->error("An error occured while creating themes cache");
39+
$this->error('An error occured while creating themes cache');
4340
}
4441
}
4542
}

src/Console/Commands/ClearCache.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,21 @@ class ClearCache extends AbstractCommand
2222

2323
/**
2424
* Create a new command instance.
25-
*
26-
* @return void
2725
*/
2826
public function __construct()
2927
{
3028
parent::__construct();
3129
}
3230

3331
/**
34-
* Prompt for module's alias name
35-
*
32+
* Prompt for module's alias name.
3633
*/
3734
public function handle()
3835
{
3936
if (ThemesManager::clearCache()) {
4037
$this->sectionMessage('Themes Manager', 'Themes cache cleared succefully');
4138
} else {
42-
$this->error("An error occured while clearing themes cache");
39+
$this->error('An error occured while clearing themes cache');
4340
}
4441
}
4542
}

src/Console/Commands/DeactivateTheme.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,27 @@ class DeactivateTheme extends AbstractCommand
2020

2121
/**
2222
* Create a new command instance.
23-
*
24-
* @return void
2523
*/
2624
public function __construct()
2725
{
2826
parent::__construct();
2927
}
3028

3129
/**
32-
* Prompt for module's alias name
33-
*
30+
* Prompt for module's alias name.
3431
*/
3532
public function handle()
3633
{
3734
$this->validateName();
3835

39-
if (! $this->theme->isActive()) {
36+
if (!$this->theme->isActive()) {
4037
$this->error("Theme with name {$this->argument('name')} is already deactivated!");
4138

4239
return false;
4340
}
4441

4542
$this->sectionMessage('Themes Manager', 'Deactivating theme...');
46-
43+
4744
if ($this->theme->deactivate()) {
4845
$this->sectionMessage('Themes Manager', 'Theme deactivated succefully');
4946
} else {

src/Console/Commands/ListThemes.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,19 @@ class ListThemes extends Command
2929

3030
/**
3131
* Create a new command instance.
32-
*
33-
* @return void
3432
*/
3533
public function __construct()
3634
{
3735
parent::__construct();
3836
}
3937

4038
/**
41-
* Prompt for module's alias name
42-
*
39+
* Prompt for module's alias name.
4340
*/
4441
public function handle()
4542
{
4643
$this->themes = [];
47-
44+
4845
$themes = \Theme::all();
4946

5047
foreach ($themes as $theme) {
@@ -58,8 +55,8 @@ public function handle()
5855
'active' => $theme->isActive() ? 'Yes' : 'No',
5956
];
6057
}
61-
62-
if (count($this->themes) == 0) {
58+
59+
if (0 == count($this->themes)) {
6360
return $this->error("Your application doesn't have any theme.");
6461
}
6562

0 commit comments

Comments
 (0)