Skip to content

Commit 7f42b7f

Browse files
committed
Refactoring
1 parent 5035d0f commit 7f42b7f

29 files changed

+261
-135
lines changed

includes/Component/Input/Group.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77

88
/**
99
* Class Options
10+
*
1011
* @package lloc\Msls\Component\Input
1112
*/
1213
class Group implements InputInterface {
1314

1415
/**
15-
* @var string[]
16+
* @var InputInterface[]
1617
*/
17-
protected $arr = [];
18+
protected $arr = array();
1819

1920
/**
2021
* @var string
@@ -45,11 +46,13 @@ public function add( InputInterface $input ): self {
4546
* @return string
4647
*/
4748
public function render(): string {
48-
$items = array_map( function ( InputInterface $input ) {
49-
return $input->render();
50-
}, $this->arr );
49+
$items = array_map(
50+
function ( InputInterface $input ) {
51+
return $input->render();
52+
},
53+
$this->arr
54+
);
5155

5256
return implode( $this->glue, $items );
5357
}
54-
55-
}
58+
}

includes/MslsAdmin.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ public function subsubsub(): string {
201201

202202
/**
203203
* Register the form-elements
204-
*
205-
* @codeCoverageIgnore
206204
*/
207205
public function register(): void {
208206
register_setting( 'msls', 'msls', array( $this, 'validate' ) );

includes/MslsAdminBar.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ public function __construct( MslsOptions $options, MslsBlogCollection $blog_coll
1313
$this->blog_collection = $blog_collection;
1414
}
1515

16-
/**
17-
* @codeCoverageIgnore
18-
*/
1916
public static function init(): void {
2017
$obj = new MslsAdminBar( msls_options(), msls_blog_collection() );
2118

includes/MslsAdminIcon.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ public function __toString() {
8181
}
8282

8383
/**
84-
* @codeCoverageIgnore
85-
*
8684
* @param ?string $type
8785
*
8886
* @return MslsAdminIcon|MslsAdminIconTaxonomy

includes/MslsContentFilter.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,13 @@ public function __construct( MslsOptions $options ) {
1010
$this->options = $options;
1111
}
1212

13-
/**
14-
* @codeCoverageIgnore
15-
*/
1613
public static function init(): void {
1714
$obj = new self( msls_options() );
1815

1916
add_filter( 'the_content', array( $obj, 'content_filter' ) );
2017
}
2118

2219
/**
23-
* Filter for the_content()
24-
*
2520
* @param string $content
2621
*
2722
* @return string

includes/MslsContentTypes.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ abstract class MslsContentTypes extends MslsRegistryInstance {
2626
/**
2727
* Factory method
2828
*
29-
* @codeCoverageIgnoreMslsContentTypes
30-
*
3129
* @return MslsContentTypes
3230
*/
3331
public static function create() {

includes/MslsCustomColumn.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
*/
1111
class MslsCustomColumn extends MslsMain {
1212

13-
/**
14-
* @codeCoverageIgnore
15-
*/
1613
public static function init(): void {
1714
$options = msls_options();
1815
$collection = msls_blog_collection();
@@ -71,8 +68,6 @@ public function th( array $columns ) {
7168
*
7269
* @param string $column_name
7370
* @param int $item_id
74-
*
75-
* @codeCoverageIgnore
7671
*/
7772
public function td( $column_name, $item_id ): void {
7873
if ( 'mslscol' == $column_name ) {

includes/MslsCustomColumnTaxonomy.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ protected function add_hooks(): void {
1515
return;
1616
}
1717

18-
$taxonomy = MslsTaxonomy::instance()->get_request();
18+
$taxonomy = msls_taxonomy()->get_request();
1919

2020
if ( ! empty( $taxonomy ) ) {
2121
add_filter( "manage_edit-{$taxonomy}_columns", array( $this, 'th' ) );
@@ -25,8 +25,6 @@ protected function add_hooks(): void {
2525
}
2626

2727
/**
28-
* Table body
29-
*
3028
* @param string $deprecated
3129
* @param string $column_name
3230
* @param int $item_id
@@ -36,8 +34,6 @@ public function column_default( $deprecated, $column_name, $item_id ): void {
3634
}
3735

3836
/**
39-
* Delete
40-
*
4137
* @codeCoverageIgnore
4238
*
4339
* @param int $object_id

includes/MslsLink.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ public static function get_types_description(): array {
6161
/**
6262
* Factory: Creates a specific instance of MslsLink
6363
*
64-
* @codeCoverageIgnore
65-
*
6664
* @param ?int $display
6765
*
6866
* @return MslsLink

includes/MslsMain.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ final public function __construct( MslsOptions $options, MslsBlogCollection $col
3636
$this->collection = $collection;
3737
}
3838

39-
/**
40-
* @codeCoverageIgnore
41-
*/
4239
public static function create(): object {
4340
return new static( msls_options(), msls_blog_collection() );
4441
}

0 commit comments

Comments
 (0)