Skip to content

Commit 986a084

Browse files
committed
(chore): run php-cs-fixer
1 parent b30df2d commit 986a084

37 files changed

+137
-120
lines changed

config/api.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
'seopress' => OWC\PDC\Base\RestAPI\ItemFields\SeoPress::class,
3131
'yoast' => OWC\PDC\Base\RestAPI\ItemFields\Yoast::class,
3232
'hide_feedback_form' => OWC\PDC\Base\RestAPI\SharedFields\HideFeedbackForm::class,
33-
'table_of_contents_is_active' => OWC\PDC\Base\RestAPI\ItemFields\TableOfContentsField::class
33+
'table_of_contents_is_active' => OWC\PDC\Base\RestAPI\ItemFields\TableOfContentsField::class
3434
],
3535
],
3636
'subthema' => [
@@ -60,7 +60,7 @@
6060
'yoast' => OWC\PDC\Base\RestAPI\ItemFields\Yoast::class,
6161
'date_modified' => OWC\PDC\Base\RestAPI\ItemFields\DateModified::class,
6262
'hide_feedback_form' => OWC\PDC\Base\RestAPI\SharedFields\HideFeedbackForm::class,
63-
'tiles' => OWC\PDC\Base\RestAPI\ThemaFields\TilesField::class
63+
'tiles' => OWC\PDC\Base\RestAPI\ThemaFields\TilesField::class
6464
],
6565
],
6666
],

config/core.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@
5353
'version' => '1.6.6',
5454
'file' => 'posts-to-posts/posts-to-posts.php',
5555
],
56-
[
57-
'type' => 'function',
58-
'label' => '<a href="https://github.com/johnbillion/extended-cpts" target="_blank">Extended CPT library</a>',
59-
'name' => 'register_extended_post_type'
60-
],
56+
[
57+
'type' => 'function',
58+
'label' => '<a href="https://github.com/johnbillion/extended-cpts" target="_blank">Extended CPT library</a>',
59+
'name' => 'register_extended_post_type'
60+
],
6161
]
6262

6363
];

config/settings.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@
8282
'id' => 'setting_pdc_use_feedback_form',
8383
'type' => 'checkbox',
8484
],
85-
'pdc_use_theme_tiles' => [
85+
'pdc_use_theme_tiles' => [
8686
'name' => __('Theme tiles', 'pdc-base'),
8787
'desc' => __('Enable theme tiles.', 'pdc-base'),
8888
'id' => 'setting_pdc_use_theme_tiles',
8989
'type' => 'checkbox',
9090
],
91-
'pdc_use_table_of_contents' => [
91+
'pdc_use_table_of_contents' => [
9292
'name' => __('Table of contents', 'pdc-base'),
9393
'desc' => __('Enable use of table of contents.', 'pdc-base'),
9494
'id' => 'setting_pdc_use_table_of_contents',

config/table_of_contents_metabox.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
'autosave' => true,
1111
'fields' => [
1212
'table_of_contents' => [
13-
[
14-
'name' => __('Table of contents', 'pdc-base'),
15-
'desc' => __('Use this option if you want to use a table of contents', 'pdc-base'),
16-
'id' => 'pdc_use_table_of_contents',
17-
'type' => 'checkbox',
18-
]
13+
[
14+
'name' => __('Table of contents', 'pdc-base'),
15+
'desc' => __('Use this option if you want to use a table of contents', 'pdc-base'),
16+
'id' => 'pdc_use_table_of_contents',
17+
'type' => 'checkbox',
18+
]
1919
],
2020
]
2121
]

config/taxonomies.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
'back_to_items' => __('← Back to tags', 'pdc-base'),
2828
],
2929
'meta_box' => 'simple',
30-
'show_in_rest' => true,
30+
'show_in_rest' => true,
3131
],
3232
'names' => [
3333
'singular' => __('Audience', 'pdc-base'),

config/theme_tiles_metabox.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@
1111
'fields' => [
1212
'tiles' => [
1313
'group' => [
14-
'id' => 'pdc_tiles_group',
15-
'type' => 'group',
16-
'clone' => true,
14+
'id' => 'pdc_tiles_group',
15+
'type' => 'group',
16+
'clone' => true,
1717
'sort_clone' => true,
1818
'add_button' => __('Add new tile', 'pdc-base'),
19-
'fields' => [
19+
'fields' => [
2020
[
21-
'id' => 'pdc_tile_title',
21+
'id' => 'pdc_tile_title',
2222
'name' => __('Title', 'pdc-base'),
2323
'type' => 'text',
2424
],
25-
[
26-
'id' => 'pdc_tile_url',
25+
[
26+
'id' => 'pdc_tile_url',
2727
'name' => __('URL', 'pdc-base'),
2828
'type' => 'url',
2929
],
30-
[
31-
'id' => 'pdc_tile_icon',
30+
[
31+
'id' => 'pdc_tile_icon',
3232
'name' => __('Icon', 'pdc-base'),
3333
'type' => 'text',
3434
],

src/Base/Admin/AdminServiceProvider.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace OWC\PDC\Base\Admin;
44

5-
use OWC\PDC\Base\Foundation\ServiceProvider;
6-
use OWC\PDC\Base\Models\Item;
75
use WP_Post;
86
use WP_REST_Response;
7+
use OWC\PDC\Base\Models\Item;
8+
use OWC\PDC\Base\Foundation\ServiceProvider;
99

1010
class AdminServiceProvider extends ServiceProvider
1111
{

src/Base/Exceptions/PropertyNotExistsException.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Exception when property is not found on object.
45
*/

src/Base/Foundation/Config.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Config object to store, save and retrieve configurations.
45
*/

src/Base/Foundation/DependencyChecker.php

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Checks if dependencies are valid.
45
*/
@@ -54,10 +55,10 @@ public function failed(): bool
5455
$this->checkPlugin($dependency);
5556

5657
break;
57-
case 'function':
58-
$this->checkFunction($dependency);
58+
case 'function':
59+
$this->checkFunction($dependency);
5960

60-
break;
61+
break;
6162
}
6263
}
6364

@@ -143,17 +144,17 @@ private function checkPlugin(array $dependency)
143144
}
144145
}
145146

146-
/**
147-
* Checks if required function exists.
148-
*/
149-
private function checkFunction(array $dependency): void
150-
{
151-
if (! function_exists($dependency['name'])) {
152-
$this->markFailed($dependency, __('Function does not exist:', 'pdc-base') . ' <b>' . $dependency['name'] . '</b>');
153-
}
154-
}
155-
156-
/**
147+
/**
148+
* Checks if required function exists.
149+
*/
150+
private function checkFunction(array $dependency): void
151+
{
152+
if (! function_exists($dependency['name'])) {
153+
$this->markFailed($dependency, __('Function does not exist:', 'pdc-base') . ' <b>' . $dependency['name'] . '</b>');
154+
}
155+
}
156+
157+
/**
157158
* Checks the installed version of the plugin.
158159
*/
159160
private function checkVersion(array $dependency): bool

src/Base/Foundation/Loader.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Provider which handles the hooks in the WordPress ecosystem.
45
*/

src/Base/Metabox/Handlers/UPLResourceHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace OWC\PDC\Base\Metabox\Handlers;
44

5-
use OWC\PDC\Base\Support\Traits\RequestUPL;
65
use WP_Post;
76
use WP_REST_Request;
7+
use OWC\PDC\Base\Support\Traits\RequestUPL;
88

99
class UPLResourceHandler
1010
{

src/Base/Metabox/MetaboxServiceProvider.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace OWC\PDC\Base\Metabox;
44

5+
use OWC\PDC\Base\Support\Traits\RequestUPL;
56
use OWC\PDC\Base\Metabox\Handlers\UPLNameHandler;
67
use OWC\PDC\Base\Metabox\Handlers\UPLResourceHandler;
7-
use OWC\PDC\Base\Support\Traits\RequestUPL;
88

99
class MetaboxServiceProvider extends MetaboxBaseServiceProvider
1010
{
@@ -41,13 +41,13 @@ public function registerMetaboxes(array $rwmbMetaboxes): array
4141
$configMetaboxes = $this->getShowOnMetabox($configMetaboxes);
4242
}
4343

44-
if ($this->plugin->settings->useThemeTiles()) {
45-
$configMetaboxes = $this->getTilesMetabox($configMetaboxes);
46-
}
44+
if ($this->plugin->settings->useThemeTiles()) {
45+
$configMetaboxes = $this->getTilesMetabox($configMetaboxes);
46+
}
4747

48-
if ($this->plugin->settings->useTableOfContents()) {
49-
$configMetaboxes = $this->getTableOfContentsMetabox($configMetaboxes);
50-
}
48+
if ($this->plugin->settings->useTableOfContents()) {
49+
$configMetaboxes = $this->getTableOfContentsMetabox($configMetaboxes);
50+
}
5151

5252
if ($this->plugin->settings->useFeedbackForm()) {
5353
$configMetaboxes = $this->getFeedbackFormMetabox($configMetaboxes);
@@ -86,12 +86,12 @@ protected function getShowOnMetabox(array $configMetaboxes): array
8686
return array_merge($configMetaboxes, $this->plugin->config->get('show_on_metabox'));
8787
}
8888

89-
protected function getTilesMetabox(array $configMetaboxes): array
89+
protected function getTilesMetabox(array $configMetaboxes): array
9090
{
9191
return array_merge($configMetaboxes, $this->plugin->config->get('theme_tiles_metabox'));
9292
}
9393

94-
protected function getTableOfContentsMetabox(array $configMetaboxes): array
94+
protected function getTableOfContentsMetabox(array $configMetaboxes): array
9595
{
9696
return array_merge($configMetaboxes, $this->plugin->config->get('table_of_contents_metabox'));
9797
}

src/Base/Models/Item.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,14 @@ public function getEscapeElement(): bool
254254
{
255255
$value = $this->getMeta('escape_element_active', '0', true, '_owc_');
256256

257-
return boolval($value);
257+
return boolval($value);
258258
}
259259

260-
public function useTableOfContents(): bool
260+
public function useTableOfContents(): bool
261261
{
262262
$value = $this->getMeta('pdc_use_table_of_contents', '0', true, '_owc_');
263263

264-
return boolval($value);
264+
return boolval($value);
265265
}
266266

267267
/**

src/Base/Models/PortalLinkGenerator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace OWC\PDC\Base\Models;
44

5-
use OWC\PDC\Base\Settings\SettingsPageOptions;
65
use WP_Term;
6+
use OWC\PDC\Base\Settings\SettingsPageOptions;
77

88
class PortalLinkGenerator
99
{

src/Base/PostType/PostTypes/PdcSubcategoryModel.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Model for the sub-category
45
*/

src/Base/Repositories/AbstractRepository.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
namespace OWC\PDC\Base\Repositories;
88

99
use Closure;
10-
use OWC\PDC\Base\Exceptions\PropertyNotExistsException;
11-
use OWC\PDC\Base\Support\CreatesFields;
12-
use OWC\PDC\Base\Support\Traits\QueryHelpers;
1310
use WP_Post;
1411
use WP_Query;
12+
use OWC\PDC\Base\Support\CreatesFields;
13+
use OWC\PDC\Base\Support\Traits\QueryHelpers;
14+
use OWC\PDC\Base\Exceptions\PropertyNotExistsException;
1515

1616
/**
1717
* PDC item object with default quering and methods.

src/Base/RestAPI/Controllers/BaseController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
namespace OWC\PDC\Base\RestAPI\Controllers;
88

9-
use OWC\PDC\Base\Foundation\Plugin;
109
use WP_Query;
1110
use WP_REST_Request;
11+
use OWC\PDC\Base\Foundation\Plugin;
1212

1313
/**
1414
* Controller which handels general quering, such as pagination.

src/Base/RestAPI/Controllers/ItemController.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
namespace OWC\PDC\Base\RestAPI\Controllers;
88

9-
use OWC\PDC\Base\Repositories\Item;
10-
use OWC\PDC\Base\Support\Traits\CheckPluginActive;
11-
use OWC\PDC\Base\Support\Traits\QueryHelpers;
129
use WP_Error;
1310
use WP_REST_Request;
11+
use OWC\PDC\Base\Repositories\Item;
12+
use OWC\PDC\Base\Support\Traits\QueryHelpers;
13+
use OWC\PDC\Base\Support\Traits\CheckPluginActive;
1414

1515
/**
1616
* Controller which handles the (requested) pdc-item(s).

src/Base/RestAPI/Controllers/SubthemaController.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ public function getSubthemas(WP_REST_Request $request): array
3232
$items->filterSource($request->get_param('source'));
3333
}
3434

35-
if ($language = $request->get_param('language')) {
36-
$items->filterLanguage((string) $language);
37-
}
35+
if ($language = $request->get_param('language')) {
36+
$items->filterLanguage((string) $language);
37+
}
3838

3939
$data = $items->all();
4040
$query = $items->getQuery();
@@ -59,9 +59,9 @@ public function getSubthema(WP_REST_Request $request)
5959
$thema->filterSource($request->get_param('source'));
6060
}
6161

62-
if ($language = $request->get_param('language')) {
63-
$thema->filterLanguage((string) $language);
64-
}
62+
if ($language = $request->get_param('language')) {
63+
$thema->filterLanguage((string) $language);
64+
}
6565

6666
$thema = $thema->find($id);
6767

@@ -91,9 +91,9 @@ public function getSubthemeBySlug(WP_REST_Request $request)
9191
$subtheme->filterSource($request->get_param('source'));
9292
}
9393

94-
if ($language = $request->get_param('language')) {
95-
$subtheme->filterLanguage((string) $language);
96-
}
94+
if ($language = $request->get_param('language')) {
95+
$subtheme->filterLanguage((string) $language);
96+
}
9797

9898
$subtheme = $subtheme->findBySlug($slug);
9999

0 commit comments

Comments
 (0)