aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Thomas Renes <thomas@renesweb.nl> 2022-01-08 16:25:17 +0100
committerGravatar GitHub <noreply@github.com> 2022-01-08 16:25:17 +0100
commit916df412f5b6f7fb9bcfb705a3c8c23e35304410 (patch)
treed87c483688575cb5a6b674849e2aefa2052116c8 /lib
parent127b7f0a3aad7012055c058e8aba0d27192a8cbc (diff)
Fix various typos and spelling errors in documentation, comments and code. (#4134)
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Error.php2
-rw-r--r--lib/Minz/ExtensionException.php4
-rw-r--r--lib/Minz/Migrator.php4
-rw-r--r--lib/Minz/Request.php2
-rw-r--r--lib/PHPMailer/PHPMailer/SMTP.php2
-rw-r--r--lib/SimplePie/SimplePie/Enclosure.php2
-rw-r--r--lib/SimplePie/SimplePie/Misc.php2
-rw-r--r--lib/http-conditional.php6
-rw-r--r--lib/lib_install.php2
-rw-r--r--lib/lib_phpQuery.php22
-rw-r--r--lib/lib_rss.php2
11 files changed, 25 insertions, 25 deletions
diff --git a/lib/Minz/Error.php b/lib/Minz/Error.php
index bef273bda..fc8e0f807 100644
--- a/lib/Minz/Error.php
+++ b/lib/Minz/Error.php
@@ -33,7 +33,7 @@ class Minz_Error {
'c' => 'error'
), $redirect);
} else {
- echo '<h1>An error occured</h1>' . "\n";
+ echo '<h1>An error occurred</h1>' . "\n";
if (!empty ($logs)) {
echo '<ul>' . "\n";
diff --git a/lib/Minz/ExtensionException.php b/lib/Minz/ExtensionException.php
index ab4c5c419..b86a97798 100644
--- a/lib/Minz/ExtensionException.php
+++ b/lib/Minz/ExtensionException.php
@@ -3,9 +3,9 @@
class Minz_ExtensionException extends Minz_Exception {
public function __construct ($message, $extension_name = false, $code = self::ERROR) {
if ($extension_name) {
- $message = 'An error occured in `' . $extension_name . '` extension with the message: ' . $message;
+ $message = 'An error occurred in `' . $extension_name . '` extension with the message: ' . $message;
} else {
- $message = 'An error occured in an unnamed extension with the message: ' . $message;
+ $message = 'An error occurred in an unnamed extension with the message: ' . $message;
}
parent::__construct($message, $code);
diff --git a/lib/Minz/Migrator.php b/lib/Minz/Migrator.php
index 71abbff3e..7afc5240e 100644
--- a/lib/Minz/Migrator.php
+++ b/lib/Minz/Migrator.php
@@ -45,7 +45,7 @@ class Minz_Migrator
return basename($filename, '.php');
}, $migration_files);
- // We apply a "low-cost" comparaison to avoid to include the migration
+ // We apply a "low-cost" comparison to avoid to include the migration
// files at each run. It is equivalent to the upToDate method.
if (count($applied_migrations) === count($migration_versions) &&
empty(array_diff($applied_migrations, $migration_versions))) {
@@ -239,7 +239,7 @@ class Minz_Migrator
* Migrate the system to the latest version.
*
* It only executes migrations AFTER the current version. If a migration
- * returns false or fails, it immediatly stops the process.
+ * returns false or fails, it immediately stops the process.
*
* If the migration doesn't return false nor raise an exception, it is
* considered as successful. It is considered as good practice to return
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index e74f4f908..ee3962615 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -313,7 +313,7 @@ class Minz_Request {
Minz_Session::lock();
$requests = Minz_Session::param('requests');
if ($requests) {
- //Delete abandonned notifications
+ //Delete abandoned notifications
$requests = array_filter($requests, function ($r) { return isset($r['time']) && $r['time'] > time() - 3600; });
$requestId = self::requestId();
diff --git a/lib/PHPMailer/PHPMailer/SMTP.php b/lib/PHPMailer/PHPMailer/SMTP.php
index 0cea1e864..565441e6b 100644
--- a/lib/PHPMailer/PHPMailer/SMTP.php
+++ b/lib/PHPMailer/PHPMailer/SMTP.php
@@ -696,7 +696,7 @@ class SMTP
/**
* Send an SMTP DATA command.
* Issues a data command and sends the msg_data to the server,
- * finializing the mail transaction. $msg_data is the message
+ * finalizing the mail transaction. $msg_data is the message
* that is to be send with the headers. Each header needs to be
* on a single line followed by a <CRLF> with the message headers
* and the message body being separated by an additional <CRLF>.
diff --git a/lib/SimplePie/SimplePie/Enclosure.php b/lib/SimplePie/SimplePie/Enclosure.php
index 8a4cffa30..cc0d038b5 100644
--- a/lib/SimplePie/SimplePie/Enclosure.php
+++ b/lib/SimplePie/SimplePie/Enclosure.php
@@ -843,7 +843,7 @@ class SimplePie_Enclosure
*
* @deprecated Use the second parameter to {@see embed} instead
*
- * @param array|string $options See first paramter to {@see embed}
+ * @param array|string $options See first parameter to {@see embed}
* @return string HTML string to output
*/
public function native_embed($options='')
diff --git a/lib/SimplePie/SimplePie/Misc.php b/lib/SimplePie/SimplePie/Misc.php
index 9317e71a4..11d6efbdc 100644
--- a/lib/SimplePie/SimplePie/Misc.php
+++ b/lib/SimplePie/SimplePie/Misc.php
@@ -42,7 +42,7 @@
*/
/**
- * Miscellanous utilities
+ * Miscellaneous utilities
*
* @package SimplePie
*/
diff --git a/lib/http-conditional.php b/lib/http-conditional.php
index ad920455d..853fdf983 100644
--- a/lib/http-conditional.php
+++ b/lib/http-conditional.php
@@ -16,9 +16,9 @@
[Implied] $cacheSeconds=0: Lifetime in seconds of the document. If $cacheSeconds<0, cache is disabled. If $cacheSeconds==0, the document will be revalidated each time it is accessed. If $cacheSeconds>0, the document will be cashed and not revalidated against the server for this delay.
[Implied] $cachePrivacy=0: 0=private, 1=normal (public), 2=forced public. When public, it allows a cashed document ($cacheSeconds>0) to be shared by several users.
[Implied] $feedMode=false: Special RSS/ATOM feeds. When true, it sets $cachePrivacy to 0 (private), does not use the modification time of the script itself, and puts the date of the client's cache (or a old date from 1980) in the global variable $clientCacheDate.
- [implied] $compression=false: Enable the compression and allows persistant connections (automatic detection of the capacities of the client).
+ [implied] $compression=false: Enable the compression and allows persistent connections (automatic detection of the capacities of the client).
[implied] $session=false: To be turned on when sessions are used. Checks if the data contained in $_SESSION has been modified during the last generation the document.
- Returns: True if the connection can be closed (e.g.: the client has already the lastest version), false if the new content has to be send to the client.
+ Returns: True if the connection can be closed (e.g.: the client has already the latest version), false if the new content has to be send to the client.
Typical use:
<?php
@@ -189,7 +189,7 @@ function _httpConditionalCallBack($buffer,$mode=5)
if (strlen($buffer2)>1) //When ob_gzhandler succeeded
$buffer=$buffer2;
}
- header('Content-Length: '.strlen($buffer)); //Allows persistant connections //rfc2616-sec14.html#sec14.13
+ header('Content-Length: '.strlen($buffer)); //Allows persistent connections //rfc2616-sec14.html#sec14.13
return $buffer;
}
diff --git a/lib/lib_install.php b/lib/lib_install.php
index 886fff54c..494ddc6dd 100644
--- a/lib/lib_install.php
+++ b/lib/lib_install.php
@@ -106,7 +106,7 @@ function initDb() {
$db['base'] = $dbBase;
$conf->db = $db;
if ($databaseDAO != null) {
- //Perfom database auto-creation
+ //Perform database auto-creation
$databaseDAO->create();
}
}
diff --git a/lib/lib_phpQuery.php b/lib/lib_phpQuery.php
index f47133235..411aa120c 100644
--- a/lib/lib_phpQuery.php
+++ b/lib/lib_phpQuery.php
@@ -336,7 +336,7 @@ class DOMDocumentWrapper {
phpQuery::debug('Full markup load (XML): '.substr($markup, 0, 250));
$this->loadMarkupReset();
$this->isXML = true;
- // check agains XHTML in contentType or markup
+ // check against XHTML in contentType or markup
$isContentTypeXHTML = $this->isXHTML();
$isMarkupXHTML = $this->isXHTML($markup);
if ($isContentTypeXHTML || $isMarkupXHTML) {
@@ -1184,7 +1184,7 @@ class phpQueryObject
/**
* Indicated if doument is just a fragment (no <html> tag).
*
- * Every document is realy a full document, so even documentFragments can
+ * Every document is really a full document, so even documentFragments can
* be queried against <html>, but getDocument(id)->htmlOuter() will return
* only contents of <body>.
*
@@ -1195,7 +1195,7 @@ class phpQueryObject
* Iterator interface helper
* @access private
*/
- protected $elementsInterator = array();
+ protected $elementsIterator = array();
/**
* Iterator interface helper
* @var bool
@@ -1340,7 +1340,7 @@ class phpQueryObject
/**
* Unloads whole document from memory.
* CAUTION! None further operations will be possible on this document.
- * All objects refering to it will be useless.
+ * All objects referring to it will be useless.
*
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
*/
@@ -1883,7 +1883,7 @@ class phpQueryObject
// strip side brackets
$attr = trim($s, '][');
$execute = false;
- // attr with specifed value
+ // attr with specified value
if (mb_strpos($s, '=')) {
$value = null;
list($attr, $value) = explode('=', $attr);
@@ -4076,7 +4076,7 @@ class phpQueryObject
$this->debug('iterating foreach');
// phpQuery::selectDocument($this->getDocumentID());
$this->elementsBackup = $this->elements;
- $this->elementsInterator = $this->elements;
+ $this->elementsIterator = $this->elements;
$this->valid = isset( $this->elements[0] )
? 1 : 0;
// $this->elements = $this->valid
@@ -4090,7 +4090,7 @@ class phpQueryObject
*/
#[\ReturnTypeWillChange]
public function current() {
- return $this->elementsInterator[ $this->current ];
+ return $this->elementsIterator[ $this->current ];
}
/**
* @return mixed
@@ -4115,11 +4115,11 @@ class phpQueryObject
public function next($cssSelector = null){
// if ($cssSelector || $this->valid)
// return $this->_next($cssSelector);
- $this->valid = isset( $this->elementsInterator[ $this->current+1 ] )
+ $this->valid = isset( $this->elementsIterator[ $this->current+1 ] )
? true
: false;
- if (! $this->valid && $this->elementsInterator) {
- $this->elementsInterator = null;
+ if (! $this->valid && $this->elementsIterator) {
+ $this->elementsIterator = null;
} else if ($this->valid) {
$this->current++;
} else {
@@ -4918,7 +4918,7 @@ abstract class phpQuery {
* @param string $file Filename to include. Defaults to "{$class}.php".
*/
public static function plugin($class, $file = null) {
- // TODO $class checked agains phpQuery_$class
+ // TODO $class checked against phpQuery_$class
// if (strpos($class, 'phpQuery') === 0)
// $class = substr($class, 8);
if (in_array($class, self::$pluginsLoaded))
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index a43bc475f..cc375f9ed 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -561,7 +561,7 @@ function recursive_unlink($dir) {
* Remove queries where $get is appearing.
* @param string $get the get attribute which should be removed.
* @param array<int,array<string,string>> $queries an array of queries.
- * @return array<int,array<string,string>> whithout queries where $get is appearing.
+ * @return array<int,array<string,string>> without queries where $get is appearing.
*/
function remove_query_by_get($get, $queries) {
$final_queries = array();