Skip to content

Commit 12c744f

Browse files
committed
These can all be private.
1 parent 6dfd689 commit 12c744f

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

src/Doc.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ final class Doc {
1616
/**
1717
* @var string
1818
*/
19-
protected $description;
19+
private $description;
2020

2121
/**
2222
* @var string
2323
*/
24-
protected $long_description;
24+
private $long_description;
2525

2626
/**
2727
* @var string
2828
*/
29-
protected $long_description_html;
29+
private $long_description_html;
3030

3131
/**
3232
* @var Tags
3333
*/
34-
protected $tags;
34+
private $tags;
3535

3636
/**
3737
* @phpstan-param DocArray $data
@@ -69,7 +69,7 @@ public function getParams(): array {
6969
/**
7070
* @phpstan-param DocArray $data
7171
*/
72-
protected function setData( array $data ): self {
72+
private function setData( array $data ): self {
7373
$this->description = $data['description'];
7474
$this->long_description = $data['long_description'];
7575
$this->long_description_html = $data['long_description_html'];

src/Hook.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,34 @@ final class Hook {
1919
/**
2020
* @var string
2121
*/
22-
protected $name;
22+
private $name;
2323

2424
/**
2525
* @var ?array<int, string>
2626
* @phpstan-var ?list<string>
2727
*/
28-
protected $aliases;
28+
private $aliases;
2929

3030
/**
3131
* @var string
3232
*/
33-
protected $file;
33+
private $file;
3434

3535
/**
3636
* @var string
3737
* @phpstan-var HookType
3838
*/
39-
protected $type;
39+
private $type;
4040

4141
/**
4242
* @var Doc
4343
*/
44-
protected $doc;
44+
private $doc;
4545

4646
/**
4747
* @var int
4848
*/
49-
protected $args;
49+
private $args;
5050

5151
/**
5252
* @phpstan-param HookArray $data
@@ -96,7 +96,7 @@ public function getParams(): array {
9696
/**
9797
* @phpstan-param HookArray $data
9898
*/
99-
protected function setData( array $data ): self {
99+
private function setData( array $data ): self {
100100
$this->name = $data['name'];
101101
$this->aliases = $data['aliases'] ?? null;
102102
$this->file = $data['file'];

src/Hooks.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class Hooks implements \Countable, \IteratorAggregate {
1313
* @var array
1414
* @phpstan-var HooksArray
1515
*/
16-
protected $data;
16+
private $data;
1717

1818
public static function fromVendor( string $directory, string $file ): self {
1919
return self::fromKnownFile( self::findFileFromVendor( $directory, $file ) );
@@ -105,7 +105,7 @@ public function includes( string $name ): bool {
105105
/**
106106
* @throws \Exception
107107
*/
108-
protected static function fromKnownFile( string $file ): self {
108+
private static function fromKnownFile( string $file ): self {
109109
$contents = file_get_contents( $file );
110110

111111
if ( $contents === false ) {
@@ -132,7 +132,7 @@ protected static function fromKnownFile( string $file ): self {
132132
/**
133133
* @throws \Exception
134134
*/
135-
protected static function findFileFromVendor( string $directory, string $path ): string {
135+
private static function findFileFromVendor( string $directory, string $path ): string {
136136
$library_dependency = $directory . '/vendor/' . $path;
137137

138138
if ( file_exists( $library_dependency ) ) {
@@ -154,7 +154,7 @@ protected static function findFileFromVendor( string $directory, string $path ):
154154
/**
155155
* @phpstan-param HooksArray $data
156156
*/
157-
protected function setData( array $data ): self {
157+
private function setData( array $data ): self {
158158
$this->data = $data;
159159

160160
return $this;

src/Tag.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,38 @@ final class Tag {
1818
/**
1919
* @var string
2020
*/
21-
protected $name;
21+
private $name;
2222

2323
/**
2424
* @var string
2525
*/
26-
protected $content;
26+
private $content;
2727

2828
/**
2929
* @var ?array<int, string>
3030
* @phpstan-var ?list<string>
3131
*/
32-
protected $types;
32+
private $types;
3333

3434
/**
3535
* @var ?string
3636
*/
37-
protected $variable;
37+
private $variable;
3838

3939
/**
4040
* @var ?string
4141
*/
42-
protected $link;
42+
private $link;
4343

4444
/**
4545
* @var ?string
4646
*/
47-
protected $refers;
47+
private $refers;
4848

4949
/**
5050
* @var ?string
5151
*/
52-
protected $description;
52+
private $description;
5353

5454
/**
5555
* @phpstan-param TagArray $data
@@ -107,7 +107,7 @@ public function getDescription(): ?string {
107107
/**
108108
* @phpstan-param TagArray $data
109109
*/
110-
protected function setData( array $data ): self {
110+
private function setData( array $data ): self {
111111
$this->name = $data['name'];
112112
$this->content = $data['content'];
113113
$this->types = $data['types'] ?? null;

src/Tags.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class Tags implements \Countable, \IteratorAggregate {
1313
* @var array<int, Tag>
1414
* @phpstan-var list<Tag>
1515
*/
16-
protected $tags;
16+
private $tags;
1717

1818
/**
1919
* @phpstan-param TagsArray $data
@@ -62,7 +62,7 @@ public function getParams(): array {
6262
/**
6363
* @phpstan-param TagsArray $data
6464
*/
65-
protected function setData( array $data ): self {
65+
private function setData( array $data ): self {
6666
$this->tags = array_map( [ '\\WPHooks\\Tag', 'fromData' ], $data );
6767

6868
return $this;

0 commit comments

Comments
 (0)