aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-01-09 18:21:40 +0100
committerGravatar GitHub <noreply@github.com> 2022-01-09 18:21:40 +0100
commit4e2dff4591bb2062311c1d5bfcdca3ade2a76d16 (patch)
treea876374a709f04f919b35ae8e1e53774a0aca39c /lib
parent9dbbe924c5e54b5dbe486873a9b31a28127c8e62 (diff)
Add spell checking with typos (#4138)
* Add spell checking with typos Implement https://github.com/FreshRSS/FreshRSS/pull/4134#issuecomment-1008027558 * GitHub Actions attempt * Quiet wget * Makefile
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/ActionController.php5
-rw-r--r--lib/Minz/Error.php9
-rw-r--r--lib/Minz/FrontController.php9
-rw-r--r--lib/Minz/Helper.php2
-rw-r--r--lib/Minz/Log.php16
-rw-r--r--lib/Minz/Model.php2
-rw-r--r--lib/Minz/ModelArray.php2
-rw-r--r--lib/Minz/Paginator.php2
-rw-r--r--lib/Minz/Session.php2
-rw-r--r--lib/Minz/Url.php20
-rw-r--r--lib/Minz/View.php2
-rw-r--r--lib/lib_opml.php14
-rw-r--r--lib/lib_rss.php2
13 files changed, 35 insertions, 52 deletions
diff --git a/lib/Minz/ActionController.php b/lib/Minz/ActionController.php
index cf41a4819..1d29d4c20 100644
--- a/lib/Minz/ActionController.php
+++ b/lib/Minz/ActionController.php
@@ -5,7 +5,7 @@
*/
/**
- * La classe ActionController représente le contrôleur de l'application
+ * The Minz_ActionController class is a controller in the MVC paradigm
*/
class Minz_ActionController {
protected $view;
@@ -16,9 +16,6 @@ class Minz_ActionController {
// Gives the possibility to override the default View type.
public static $viewType = 'Minz_View';
- /**
- * Constructeur
- */
public function __construct () {
if (class_exists(self::$viewType)) {
$this->view = new self::$viewType();
diff --git a/lib/Minz/Error.php b/lib/Minz/Error.php
index fc8e0f807..3162c6f99 100644
--- a/lib/Minz/Error.php
+++ b/lib/Minz/Error.php
@@ -5,7 +5,7 @@
*/
/**
- * La classe Error permet de lancer des erreurs HTTP
+ * The Minz_Error class logs and raises framework errors
*/
class Minz_Error {
public function __construct () { }
@@ -48,10 +48,9 @@ class Minz_Error {
}
/**
- * Permet de retourner les logs de façon à n'avoir que
- * ceux que l'on veut réellement
- * @param array<string,string>|string $logs les logs rangés par catégories (error, warning, notice)
- * @return array<string> liste des logs, sans catégorie, en fonction de l'environment
+ * Returns filtered logs
+ * @param array<string,string>|string $logs logs sorted by category (error, warning, notice)
+ * @return array<string> list of matching logs, without the category, according to environment preferences (production / development)
*/
private static function processLogs ($logs) {
$conf = Minz_Configuration::get('system');
diff --git a/lib/Minz/FrontController.php b/lib/Minz/FrontController.php
index 9be39a0d1..17bbc1818 100644
--- a/lib/Minz/FrontController.php
+++ b/lib/Minz/FrontController.php
@@ -19,8 +19,9 @@
# ***** END LICENSE BLOCK *****
/**
- * La classe FrontController est le Dispatcher du framework, elle lance l'application
- * Elle est appelée en général dans le fichier index.php à la racine du serveur
+ * The Minz_FrontController class is the framework Dispatcher.
+ * It runs the application.
+ * It is generally invoqued by an index.php file at the root.
*/
class Minz_FrontController {
protected $dispatcher;
@@ -50,8 +51,8 @@ class Minz_FrontController {
}
/**
- * Retourne un tableau représentant l'url passée par la barre d'adresses
- * @return array représentant l'url
+ * Returns an array representing the URL as passed in the address bar
+ * @return array URL representation
*/
private function buildUrl() {
$url = array();
diff --git a/lib/Minz/Helper.php b/lib/Minz/Helper.php
index 5fddbf91c..b38292fbe 100644
--- a/lib/Minz/Helper.php
+++ b/lib/Minz/Helper.php
@@ -5,7 +5,7 @@
*/
/**
- * La classe Helper représente une aide pour des tâches récurrentes
+ * The Minz_Helper class contains some misc. help functions
*/
class Minz_Helper {
diff --git a/lib/Minz/Log.php b/lib/Minz/Log.php
index e0e22e532..80b93a097 100644
--- a/lib/Minz/Log.php
+++ b/lib/Minz/Log.php
@@ -5,7 +5,7 @@
*/
/**
- * La classe Log permet de logger des erreurs
+ * The Minz_Log class is used to log errors and warnings
*/
class Minz_Log {
/**
@@ -108,20 +108,6 @@ class Minz_Log {
}
/**
- * Automatise le log des variables globales $_GET et $_POST
- * Fait appel à la fonction record(...)
- * Ne fonctionne qu'en environnement "development"
- * @param string $file_name fichier de log
- */
- public static function recordRequest($file_name = null) {
- $msg_get = str_replace("\n", '', '$_GET content : ' . print_r($_GET, true));
- $msg_post = str_replace("\n", '', '$_POST content : ' . print_r($_POST, true));
-
- self::record($msg_get, LOG_DEBUG, $file_name);
- self::record($msg_post, LOG_DEBUG, $file_name);
- }
-
- /**
* Some helpers to Minz_Log::record() method
* Parameters are the same of those of the record() method.
*/
diff --git a/lib/Minz/Model.php b/lib/Minz/Model.php
index 1310888cf..bf6da1599 100644
--- a/lib/Minz/Model.php
+++ b/lib/Minz/Model.php
@@ -5,7 +5,7 @@
*/
/**
- * La classe Model représente un modèle de l'application (représentation MVC)
+ * The Minz_Model class represents a model in the MVC paradigm.
*/
class Minz_Model {
diff --git a/lib/Minz/ModelArray.php b/lib/Minz/ModelArray.php
index 814292082..72de35f35 100644
--- a/lib/Minz/ModelArray.php
+++ b/lib/Minz/ModelArray.php
@@ -5,7 +5,7 @@
*/
/**
- * La classe Model_array représente le modèle interragissant avec les fichiers de type texte gérant des tableaux php
+ * The Minz_ModelArray class is the model to interact with text files containing a PHP array
*/
class Minz_ModelArray {
/**
diff --git a/lib/Minz/Paginator.php b/lib/Minz/Paginator.php
index f7bb0cc4f..0d9f2b6c3 100644
--- a/lib/Minz/Paginator.php
+++ b/lib/Minz/Paginator.php
@@ -5,7 +5,7 @@
*/
/**
- * La classe Paginator permet de gérer la pagination de l'application facilement
+ * The Minz_Paginator is used to handle paging
*/
class Minz_Paginator {
/**
diff --git a/lib/Minz/Session.php b/lib/Minz/Session.php
index d5a002005..d735f7949 100644
--- a/lib/Minz/Session.php
+++ b/lib/Minz/Session.php
@@ -1,7 +1,7 @@
<?php
/**
- * La classe Session gère la session utilisateur
+ * The Minz_Session class handles user’s session
*/
class Minz_Session {
private static $volatile = false;
diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php
index 0bbf28b0d..06390c4c6 100644
--- a/lib/Minz/Url.php
+++ b/lib/Minz/Url.php
@@ -1,21 +1,21 @@
<?php
/**
- * La classe Url permet de gérer les URL à travers MINZ
+ * The Minz_Url class handles URLs across the MINZ framework
*/
class Minz_Url {
/**
- * Affiche une Url formatée
- * @param string|array<string,string|array<string,mixed>> $url l'url à formater définie comme un tableau :
+ * Display a formatted URL
+ * @param string|array<string,string|array<string,mixed>> $url The URL to format, defined as an array:
* $url['c'] = controller
* $url['a'] = action
- * $url['params'] = tableau des paramètres supplémentaires
- * ou comme une chaîne de caractère
- * @param string $encodage pour indiquer comment encoder les & (& ou &amp; pour html)
+ * $url['params'] = array of additional parameters
+ * or as a string
+ * @param string $encoding how to encode & (& ou &amp; pour html)
* @param bool|string $absolute
- * @return string url formatée
+ * @return string Formatted URL
*/
- public static function display ($url = array (), $encodage = 'html', $absolute = false) {
+ public static function display ($url = array (), $encoding = 'html', $absolute = false) {
$isArray = is_array($url);
if ($isArray) {
@@ -44,8 +44,8 @@ class Minz_Url {
}
if ($isArray) {
- $url_string .= '/' . self::printUri($url, $encodage);
- } elseif ($encodage === 'html') {
+ $url_string .= '/' . self::printUri($url, $encoding);
+ } elseif ($encoding === 'html') {
$url_string = Minz_Helper::htmlspecialchars_utf8($url_string . $url);
} else {
$url_string .= $url;
diff --git a/lib/Minz/View.php b/lib/Minz/View.php
index 6b90b3c31..431a8b700 100644
--- a/lib/Minz/View.php
+++ b/lib/Minz/View.php
@@ -5,7 +5,7 @@
*/
/**
- * La classe View représente la vue de l'application
+ * The Minz_View represents a view in the MVC paradigm
*/
class Minz_View {
const VIEWS_PATH_NAME = '/views';
diff --git a/lib/lib_opml.php b/lib/lib_opml.php
index 3dd415d05..5c111641b 100644
--- a/lib/lib_opml.php
+++ b/lib/lib_opml.php
@@ -131,17 +131,17 @@ function preprocessing_categories($doc) {
foreach ($outlines as $outline) {
$category = trim($outline->getAttribute('category'));
if ($category != '') {
- $outline_categorie = null;
+ $outline_category = null;
if (!isset($outline_categories[$category])) {
- $outline_categorie = $doc->createElement('outline');
- $outline_categorie->setAttribute('text', $category);
- $body->insertBefore($outline_categorie, $body->firstChild);
- $outline_categories[$category] = $outline_categorie;
+ $outline_category = $doc->createElement('outline');
+ $outline_category->setAttribute('text', $category);
+ $body->insertBefore($outline_category, $body->firstChild);
+ $outline_categories[$category] = $outline_category;
} else {
- $outline_categorie = $outline_categories[$category];
+ $outline_category = $outline_categories[$category];
}
$outline->parentNode->removeChild($outline);
- $outline_categorie->appendChild($outline);
+ $outline_category->appendChild($outline);
}
}
}
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index cc375f9ed..bc4b06497 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -160,7 +160,7 @@ function escapeToUnicodeAlternative($text, $extended = true) {
function format_number($n, $precision = 0) {
// number_format does not seem to be Unicode-compatible
- return str_replace(' ', ' ', //Espace fine insécable
+ return str_replace(' ', ' ', // Thin non-breaking space
number_format($n, $precision, '.', ' ')
);
}