Skip to content

Commit ba92fc9

Browse files
authored
Enhancement: Enable visibility_required fixer
Closes GH-639.
1 parent 4b3e3c9 commit ba92fc9

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
$config->setRules([
1313
'no_trailing_whitespace' => true,
14+
'visibility_required' => true,
1415
'whitespace_after_comma_in_array' => true,
1516
]);
1617

src/News/Entry.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
namespace phpweb\News;
44

55
class Entry {
6-
const CATEGORIES = [
6+
public const CATEGORIES = [
77
'frontpage' => 'PHP.net frontpage news',
88
'releases' => 'New PHP release',
99
'conferences' => 'Conference announcement',
1010
'cfp' => 'Call for Papers',
1111
];
1212

13-
const WEBROOT = "https://www.php.net";
14-
const PHPWEB = __DIR__ . '/../../';
15-
const ARCHIVE_FILE_REL = 'archive/archive.xml';
16-
const ARCHIVE_FILE_ABS = self::PHPWEB . self::ARCHIVE_FILE_REL;
17-
const ARCHIVE_ENTRIES_REL = 'archive/entries/';
18-
const ARCHIVE_ENTRIES_ABS = self::PHPWEB . self::ARCHIVE_ENTRIES_REL;
19-
const IMAGE_PATH_REL = 'images/news/';
20-
const IMAGE_PATH_ABS = self::PHPWEB . self::IMAGE_PATH_REL;
13+
public const WEBROOT = "https://www.php.net";
14+
public const PHPWEB = __DIR__ . '/../../';
15+
public const ARCHIVE_FILE_REL = 'archive/archive.xml';
16+
public const ARCHIVE_FILE_ABS = self::PHPWEB . self::ARCHIVE_FILE_REL;
17+
public const ARCHIVE_ENTRIES_REL = 'archive/entries/';
18+
public const ARCHIVE_ENTRIES_ABS = self::PHPWEB . self::ARCHIVE_ENTRIES_REL;
19+
public const IMAGE_PATH_REL = 'images/news/';
20+
public const IMAGE_PATH_ABS = self::PHPWEB . self::IMAGE_PATH_REL;
2121

2222

2323
protected $title = '';

src/UserNotes/Sorter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Sorter {
1515
private $ratingWeight = 60;
1616
private $ageWeight = 2;
1717

18-
function sort(array &$notes) {
18+
public function sort(array &$notes) {
1919
// First we make a pass over the data to get the min and max values
2020
// for data normalization.
2121
$this->findMinMaxValues($notes);

0 commit comments

Comments
 (0)