Skip to content

Commit b6be60e

Browse files
committed
style: composer style
1 parent 3ca9dfc commit b6be60e

File tree

6 files changed

+14
-18
lines changed

6 files changed

+14
-18
lines changed

app/Controllers/DungeonController.php

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

33
namespace App\Controllers;
44

5-
use App\Controllers\BaseController;
65
use App\Models\DungeonModel;
76
use App\Models\HeroModel;
87

@@ -39,7 +38,7 @@ public function show(int $id)
3938
}
4039

4140
echo view('dungeon', [
42-
'dungeon' => $dungeon,
41+
'dungeon' => $dungeon,
4342
'monsters' => $dungeon->monsters(3),
4443
]);
4544
}

app/Controllers/HeroController.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace App\Controllers;
44

5-
use App\Controllers\BaseController;
65
use App\Models\HeroModel;
76
use CodeIgniter\Exceptions\PageNotFoundException;
87

@@ -17,9 +16,9 @@ class HeroController extends BaseController
1716
*/
1817
public function show(int $id)
1918
{
20-
// When you only need to use a model in a single place,
21-
// you can simply get a new instance here. It will use
22-
// the default database connection if none is passed in
19+
// When you only need to use a model in a single place,
20+
// you can simply get a new instance here. It will use
21+
// the default database connection if none is passed in
2322
// during instantiation.
2423
$heroes = new HeroModel();
2524

app/Entities/Dungeon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function link(): string
3939
/**
4040
* Use another model to get some random data.
4141
*/
42-
public function monsters(int $limit=5)
42+
public function monsters(int $limit = 5)
4343
{
4444
return model(MonsterModel::class)
4545
->where('dungeon_id', $this->id)

app/Entities/Monster.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
namespace App\Entities;
44

55
use CodeIgniter\Entity\Entity;
6-
use CodeIgniter\HTTP\Exceptions\HTTPException;
7-
use InvalidArgumentException;
86

97
/**
108
* Class Monster

app/Views/errors/html/error_exception.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
use Config\Services;
32
use CodeIgniter\CodeIgniter;
3+
use Config\Services;
44

55
$errorId = uniqid('error', true);
66
?>
@@ -89,11 +89,11 @@
8989

9090
<?php
9191
$params = null;
92-
// Reflection by name is not available for closure function
93-
if (substr($row['function'], -1) !== '}') {
94-
$mirror = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']);
95-
$params = $mirror->getParameters();
96-
}
92+
// Reflection by name is not available for closure function
93+
if (substr($row['function'], -1) !== '}') {
94+
$mirror = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']);
95+
$params = $mirror->getParameters();
96+
}
9797

9898
foreach ($row['args'] as $key => $value) : ?>
9999
<tr>
@@ -303,8 +303,8 @@
303303
<!-- Response -->
304304
<?php
305305
$response = Services::response();
306-
$response->setStatusCode(http_response_code());
307-
?>
306+
$response->setStatusCode(http_response_code());
307+
?>
308308
<div class="content" id="response">
309309
<table>
310310
<tr>

app/Views/hero.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div class="col-6 mx-auto">
3030

3131
<div class="card shadow">
32-
<img src="<?= base_url('images/'. esc($hero->image, 'attr')) ?>"
32+
<img src="<?= base_url('images/' . esc($hero->image, 'attr')) ?>"
3333
alt="<?= esc($hero->name, 'attr') ?>"
3434
class="card-img-top"
3535
>

0 commit comments

Comments
 (0)