Skip to content

Commit 0ef8a49

Browse files
committed
Make props private, remove defaults overwritten in constructor and add types
1 parent 0902895 commit 0ef8a49

File tree

2 files changed

+49
-19
lines changed

2 files changed

+49
-19
lines changed

src/Style/CheckboxStyle.php

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,37 @@
44

55
class CheckboxStyle
66
{
7-
protected const DEFAULT_STYLES = [
7+
private const DEFAULT_STYLES = [
88
'markerOn' => '[✔] ',
99
'markerOff' => '[ ] ',
1010
'itemExtra' => '',
1111
'displaysExtra' => false,
1212
];
1313

14-
protected $markerOn = '';
15-
16-
protected $markerOff = '';
17-
18-
protected $itemExtra = '';
19-
20-
protected $displaysExtra = false;
21-
22-
protected $custom = false;
14+
/**
15+
* @var string
16+
*/
17+
private $markerOn;
18+
19+
/**
20+
* @var string
21+
*/
22+
private $markerOff;
23+
24+
/**
25+
* @var string
26+
*/
27+
private $itemExtra;
28+
29+
/**
30+
* @var bool
31+
*/
32+
private $displaysExtra;
33+
34+
/**
35+
* @var bool
36+
*/
37+
private $custom = false;
2338

2439
public function __construct()
2540
{

src/Style/RadioStyle.php

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,36 @@
44

55
class RadioStyle
66
{
7-
protected const DEFAULT_STYLES = [
7+
private const DEFAULT_STYLES = [
88
'markerOn' => '[●] ',
99
'markerOff' => '[○] ',
1010
'itemExtra' => '',
1111
'displaysExtra' => false,
1212
];
1313

14-
protected $markerOn = '';
15-
16-
protected $markerOff = '';
17-
18-
protected $itemExtra = '';
19-
20-
protected $displaysExtra = false;
21-
14+
/**
15+
* @var string
16+
*/
17+
private $markerOn;
18+
19+
/**
20+
* @var string
21+
*/
22+
private $markerOff;
23+
24+
/**
25+
* @var string
26+
*/
27+
private $itemExtra;
28+
29+
/**
30+
* @var bool
31+
*/
32+
private $displaysExtra;
33+
34+
/**
35+
* @var bool
36+
*/
2237
protected $custom = false;
2338

2439
public function __construct()

0 commit comments

Comments
 (0)