Skip to content

Commit

Permalink
Enhancement: Enable visibility_required fixer
Browse files Browse the repository at this point in the history
Closes GH-639.
  • Loading branch information
localheinz authored Jul 11, 2022
1 parent 4b3e3c9 commit ba92fc9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

$config->setRules([
'no_trailing_whitespace' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,
]);

Expand Down
18 changes: 9 additions & 9 deletions src/News/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
namespace phpweb\News;

class Entry {
const CATEGORIES = [
public const CATEGORIES = [
'frontpage' => 'PHP.net frontpage news',
'releases' => 'New PHP release',
'conferences' => 'Conference announcement',
'cfp' => 'Call for Papers',
];

const WEBROOT = "https://www.php.net";
const PHPWEB = __DIR__ . '/../../';
const ARCHIVE_FILE_REL = 'archive/archive.xml';
const ARCHIVE_FILE_ABS = self::PHPWEB . self::ARCHIVE_FILE_REL;
const ARCHIVE_ENTRIES_REL = 'archive/entries/';
const ARCHIVE_ENTRIES_ABS = self::PHPWEB . self::ARCHIVE_ENTRIES_REL;
const IMAGE_PATH_REL = 'images/news/';
const IMAGE_PATH_ABS = self::PHPWEB . self::IMAGE_PATH_REL;
public const WEBROOT = "https://www.php.net";
public const PHPWEB = __DIR__ . '/../../';
public const ARCHIVE_FILE_REL = 'archive/archive.xml';
public const ARCHIVE_FILE_ABS = self::PHPWEB . self::ARCHIVE_FILE_REL;
public const ARCHIVE_ENTRIES_REL = 'archive/entries/';
public const ARCHIVE_ENTRIES_ABS = self::PHPWEB . self::ARCHIVE_ENTRIES_REL;
public const IMAGE_PATH_REL = 'images/news/';
public const IMAGE_PATH_ABS = self::PHPWEB . self::IMAGE_PATH_REL;


protected $title = '';
Expand Down
2 changes: 1 addition & 1 deletion src/UserNotes/Sorter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Sorter {
private $ratingWeight = 60;
private $ageWeight = 2;

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

0 comments on commit ba92fc9

Please sign in to comment.