mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Enhancement: Enable visibility_required fixer
Closes GH-639.
This commit is contained in:
@@ -11,6 +11,7 @@ $finder = $config->getFinder()
|
||||
|
||||
$config->setRules([
|
||||
'no_trailing_whitespace' => true,
|
||||
'visibility_required' => true,
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
]);
|
||||
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user