Skip to content

Commit f6566e9

Browse files
authored
Merge pull request #258 from PHPCSStandards/feature/198-filters-property-rename-follow-up
Filter/ExactMatch: rename a private property
2 parents e419a21 + 89535fb commit f6566e9

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/Filters/ExactMatch.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* An abstract filter class for checking files and folders against exact matches.
44
*
5-
* Supports both allowed files and blocked files.
5+
* Supports both allowed files and disallowed files.
66
*
77
* @author Greg Sherwood <[email protected]>
88
* @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
@@ -21,12 +21,12 @@ abstract class ExactMatch extends Filter
2121
*
2222
* @var array
2323
*/
24-
private $blockedFiles = null;
24+
private $disallowedFiles = null;
2525

2626
/**
2727
* A list of files to include.
2828
*
29-
* If the allowed files list is empty, only files in the blocked files list will be excluded.
29+
* If the allowed files list is empty, only files in the disallowed files list will be excluded.
3030
*
3131
* @var array
3232
*/
@@ -36,7 +36,7 @@ abstract class ExactMatch extends Filter
3636
/**
3737
* Check whether the current element of the iterator is acceptable.
3838
*
39-
* If a file is both blocked and allowed, it will be deemed unacceptable.
39+
* If a file is both disallowed and allowed, it will be deemed unacceptable.
4040
*
4141
* @return bool
4242
*/
@@ -46,8 +46,8 @@ public function accept()
4646
return false;
4747
}
4848

49-
if ($this->blockedFiles === null) {
50-
$this->blockedFiles = $this->getblacklist();
49+
if ($this->disallowedFiles === null) {
50+
$this->disallowedFiles = $this->getblacklist();
5151
}
5252

5353
if ($this->allowedFiles === null) {
@@ -56,13 +56,13 @@ public function accept()
5656

5757
$filePath = Util\Common::realpath($this->current());
5858

59-
// If file is both blocked and allowed, the blocked files list takes precedence.
60-
if (isset($this->blockedFiles[$filePath]) === true) {
59+
// If file is both disallowed and allowed, the disallowed files list takes precedence.
60+
if (isset($this->disallowedFiles[$filePath]) === true) {
6161
return false;
6262
}
6363

64-
if (empty($this->allowedFiles) === true && empty($this->blockedFiles) === false) {
65-
// We are only checking a blocked files list, so everything else should be allowed.
64+
if (empty($this->allowedFiles) === true && empty($this->disallowedFiles) === false) {
65+
// We are only checking a disallowed files list, so everything else should be allowed.
6666
return true;
6767
}
6868

@@ -74,16 +74,16 @@ public function accept()
7474
/**
7575
* Returns an iterator for the current entry.
7676
*
77-
* Ensures that the blocked files list and the allowed files list are preserved so they don't have
77+
* Ensures that the disallowed files list and the allowed files list are preserved so they don't have
7878
* to be generated each time.
7979
*
8080
* @return \RecursiveIterator
8181
*/
8282
public function getChildren()
8383
{
8484
$children = parent::getChildren();
85-
$children->blockedFiles = $this->blockedFiles;
86-
$children->allowedFiles = $this->allowedFiles;
85+
$children->disallowedFiles = $this->disallowedFiles;
86+
$children->allowedFiles = $this->allowedFiles;
8787
return $children;
8888

8989
}//end getChildren()

0 commit comments

Comments
 (0)