Skip to content

Commit 097e235

Browse files
authored
Merge pull request #34 from iMattPro/fixes
Minor fixes
2 parents 672e39b + 4d1f2b0 commit 097e235

8 files changed

Lines changed: 7 additions & 34 deletions

File tree

config/services.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ services:
1919

2020
phpbb.pwakit.upload:
2121
class: phpbb\pwakit\helper\upload
22+
shared: false
2223
arguments:
2324
- '@files.upload'
2425
- '@phpbb.pwakit.storage'

controller/admin_controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,12 @@ protected function delete(): void
328328
}
329329
else
330330
{
331-
confirm_box(false, 'ACP_PWA_IMG_DELETE', build_hidden_fields(array(
331+
confirm_box(false, 'ACP_PWA_IMG_DELETE', build_hidden_fields([
332332
'i' => $this->id,
333333
'mode' => 'settings',
334334
'delete' => $path,
335335
'action' => $this->u_action,
336-
)));
336+
]));
337337
}
338338
}
339339

tests/unit/acp_module_test.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727

2828
class acp_module_test extends phpbb_test_case
2929
{
30-
/** @var phpbb_mock_extension_manager */
3130
protected phpbb_mock_extension_manager $extension_manager;
32-
33-
/** @var module_manager */
3431
protected module_manager $module_manager;
3532

3633
protected function setUp(): void

tests/unit/admin_controller_test.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,20 @@
3232
class admin_controller_test extends phpbb_database_test_case
3333
{
3434
public static bool $confirm;
35-
3635
public static bool $valid_form;
3736

3837
protected dbal $db;
39-
4038
protected config $config;
41-
4239
protected language $language;
43-
4440
protected request $request;
45-
4641
protected template|MockObject $template;
47-
4842
protected helper $helper;
49-
5043
protected upload $upload;
51-
5244
protected string $phpbb_root_path;
5345

5446
protected static function setup_extensions(): array
5547
{
56-
return array('phpbb/pwakit');
48+
return ['phpbb/pwakit'];
5749
}
5850

5951
protected function getDataSet(): IDataSet|XmlDataSet|DefaultDataSet

tests/unit/event_listener_test.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,8 @@
2121

2222
class event_listener_test extends phpbb_test_case
2323
{
24-
/** @var user|MockObject */
2524
protected user|MockObject $user;
26-
27-
/** @var template|MockObject */
2825
protected template|MockObject $template;
29-
30-
/** @var helper */
3126
protected helper $helper;
3227

3328
/**

tests/unit/ext_test.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
class ext_test extends phpbb_test_case
2626
{
2727
protected ContainerInterface|MockObject $container;
28-
2928
protected finder|MockObject $extension_finder;
30-
3129
protected migrator|MockObject $migrator;
3230

3331
protected function setUp(): void

tests/unit/helper_test.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,16 @@ class helper_test extends phpbb_database_test_case
3535
{
3636
protected const FIXTURES = __DIR__ . '/../fixtures/';
3737

38-
/** @var config */
3938
protected config $config;
40-
41-
/** @var template|MockObject */
4239
protected template|MockObject $template;
43-
44-
/** @var helper */
4540
protected helper $helper;
46-
47-
/** @var storage */
4841
protected storage $storage;
49-
50-
/** @var string */
5142
protected string $storage_path;
52-
5343
protected string $phpbb_root_path;
5444

5545
protected static function setup_extensions(): array
5646
{
57-
return array('phpbb/pwakit');
47+
return ['phpbb/pwakit'];
5848
}
5949

6050
protected function getDataSet(): IDataSet|XmlDataSet|DefaultDataSet

tests/unit/upload_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
class upload_test extends phpbb_test_case
2222
{
23-
protected MockObject|\phpbb\files\upload $files_upload;
23+
protected MockObject|files_upload $files_upload;
2424
protected MockObject|filespec_storage $file;
25-
protected storage|MockObject $storage;
25+
protected MockObject|storage $storage;
2626

2727
protected static function setup_extensions(): array
2828
{

0 commit comments

Comments
 (0)