diff options
author | JT Smith <nexxai@gmail.com> | 2022-10-07 13:19:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 13:19:35 +0300 |
commit | d3de8d64f477d14bf10d5cd1d17521f0c19950ed (patch) | |
tree | 29f1ef4f85b4a31c2d3f2b3272b815c34c1c334f | |
parent | 8a3c0e87e1377a7ec0bc12c40d35852bd3af27be (diff) |
Typofixes (#19805)
* Fixing typo in array property
* Fixing "nonexistant" throughout codebase
* Fixing misspelling of Password
* Typofixes in comments
* Update core/Plugin/Dimension/VisitDimension.php
Co-authored-by: Justin Velluppillai <justinvelluppillai@gmail.com>
* Reverting change of idDimenson
Co-authored-by: Justin Velluppillai <justinvelluppillai@gmail.com>
-rw-r--r-- | config/global.ini.php | 2 | ||||
-rw-r--r-- | core/Access/CapabilitiesProvider.php | 2 | ||||
-rw-r--r-- | core/Archive/ArchiveInvalidator.php | 10 | ||||
-rw-r--r-- | core/Auth/Password.php | 4 | ||||
-rw-r--r-- | core/Columns/Dimension.php | 2 | ||||
-rw-r--r-- | core/Common.php | 2 | ||||
-rw-r--r-- | core/Concurrency/LockBackend/MySqlLockBackend.php | 2 | ||||
-rw-r--r-- | core/CronArchive.php | 8 | ||||
-rw-r--r-- | core/DataAccess/ArchiveSelector.php | 2 | ||||
-rw-r--r-- | core/DataAccess/LogAggregator.php | 4 | ||||
-rw-r--r-- | core/DataAccess/Model.php | 4 | ||||
-rw-r--r-- | core/DataTable/Filter/Truncate.php | 2 | ||||
-rw-r--r-- | core/DataTable/Map.php | 2 | ||||
-rw-r--r-- | core/Plugin/Dimension/VisitDimension.php | 8 | ||||
-rw-r--r-- | core/Plugin/Report.php | 2 | ||||
-rw-r--r-- | core/Plugin/Segment.php | 2 | ||||
-rw-r--r-- | core/Plugin/Tasks.php | 2 | ||||
-rw-r--r-- | core/Settings/Measurable/MeasurableSettings.php | 2 | ||||
-rw-r--r-- | core/Settings/Plugin/SystemSettings.php | 2 | ||||
-rw-r--r-- | core/Settings/Plugin/UserSettings.php | 2 | ||||
-rw-r--r-- | plugins/CoreAdminHome/API.php | 4 | ||||
-rw-r--r-- | plugins/CoreAdminHome/tests/Framework/Mock/API.php | 2 |
22 files changed, 36 insertions, 36 deletions
diff --git a/config/global.ini.php b/config/global.ini.php index bf687793b1..f5b0736964 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -1043,7 +1043,7 @@ innodb_lock_wait_timeout = 0 ; For example "e_c==Media" means that all tracking requests will be excluded where the event category is Media. ; Multiple exclusions can be configured separated by a comma. The request will be excluded if any expressions matches (not all of them). For example: "e_c==Media,action_name=@privacy". ; This would also exclude any request from being tracked where the page title contains privacy. -; All comparisons are performed case insensitve. The value to match on the right side should be URL encoded. +; All comparisons are performed case insensitive. The value to match on the right side should be URL encoded. ; For example: "action_name=^foo%2Cbar" would exclude page titles that start with "foo,bar". ; For a list of tracking parameters you can use on the left side view https://developer.matomo.org/api-reference/tracking-api exclude_requests = "" diff --git a/core/Access/CapabilitiesProvider.php b/core/Access/CapabilitiesProvider.php index e0693b7972..6e4e29b663 100644 --- a/core/Access/CapabilitiesProvider.php +++ b/core/Access/CapabilitiesProvider.php @@ -34,7 +34,7 @@ class CapabilitiesProvider * * public function addCapabilities(&$capabilities) * { - * $capabilities[] = new MyNewCapabilitiy(); + * $capabilities[] = new MyNewCapability(); * } * * @param Capability[] $reports An array of reports diff --git a/core/Archive/ArchiveInvalidator.php b/core/Archive/ArchiveInvalidator.php index 5ed7a5961f..eb8a7646ee 100644 --- a/core/Archive/ArchiveInvalidator.php +++ b/core/Archive/ArchiveInvalidator.php @@ -254,7 +254,7 @@ class ArchiveInvalidator * @param $period string * @param $segment Segment * @param bool $cascadeDown - * @param bool $forceInvalidateNonexistantRanges set true to force inserting rows for ranges in archive_invalidations + * @param bool $forceInvalidateNonexistentRanges set true to force inserting rows for ranges in archive_invalidations * @param string $name null to make sure every plugin is archived when this invalidation is processed by core:archive, * or a plugin name to only archive the specific plugin. * @param bool $ignorePurgeLogDataDate @@ -262,7 +262,7 @@ class ArchiveInvalidator * @throws \Exception */ public function markArchivesAsInvalidated(array $idSites, array $dates, $period, Segment $segment = null, $cascadeDown = false, - $forceInvalidateNonexistantRanges = false, $name = null, $ignorePurgeLogDataDate = false) + $forceInvalidateNonexistentRanges = false, $name = null, $ignorePurgeLogDataDate = false) { $plugin = null; if ($name && strpos($name, '.') !== false) { @@ -320,7 +320,7 @@ class ArchiveInvalidator $allPeriodsToInvalidate = $this->getAllPeriodsByYearMonth($period, $datesToInvalidate, $cascadeDown); - $this->markArchivesInvalidated($idSites, $allPeriodsToInvalidate, $segment, $period != 'range', $forceInvalidateNonexistantRanges, $name); + $this->markArchivesInvalidated($idSites, $allPeriodsToInvalidate, $segment, $period != 'range', $forceInvalidateNonexistentRanges, $name); $isInvalidatingDays = $period == 'day' || $cascadeDown || empty($period); $isNotInvalidatingSegment = empty($segment) || empty($segment->getString()); @@ -678,7 +678,7 @@ class ArchiveInvalidator * @throws \Exception */ private function markArchivesInvalidated($idSites, $dates, Segment $segment = null, $removeRanges = false, - $forceInvalidateNonexistantRanges = false, $name = null) + $forceInvalidateNonexistentRanges = false, $name = null) { $idSites = array_map('intval', $idSites); @@ -690,7 +690,7 @@ class ArchiveInvalidator $table = ArchiveTableCreator::getNumericTable($tableDateObj); $yearMonths[] = $tableDateObj->toString('Y_m'); - $this->model->updateArchiveAsInvalidated($table, $idSites, $datesForTable, $segment, $forceInvalidateNonexistantRanges, $name); + $this->model->updateArchiveAsInvalidated($table, $idSites, $datesForTable, $segment, $forceInvalidateNonexistentRanges, $name); if ($removeRanges) { $this->model->updateRangeArchiveAsInvalidated($table, $idSites, $datesForTable, $segment); diff --git a/core/Auth/Password.php b/core/Auth/Password.php index 51634ec9ed..140d6112ca 100644 --- a/core/Auth/Password.php +++ b/core/Auth/Password.php @@ -26,8 +26,8 @@ class Password */ private function preferredAlgorithm() { - $passwordHashAlogrithm = Config::getInstance()->General['password_hash_algorithm']; - switch ($passwordHashAlogrithm) { + $passwordHashAlgorithm = Config::getInstance()->General['password_hash_algorithm']; + switch ($passwordHashAlgorithm) { case "default": return PASSWORD_DEFAULT; case "bcrypt": diff --git a/core/Columns/Dimension.php b/core/Columns/Dimension.php index 0875e1e753..7623e5e038 100644 --- a/core/Columns/Dimension.php +++ b/core/Columns/Dimension.php @@ -133,7 +133,7 @@ abstract class Dimension protected $acceptValues; /** - * Defines to which column in the MySQL database the segment belongs (if one is conifugred). Defaults to + * Defines to which column in the MySQL database the segment belongs (if one is configured). Defaults to * `$this.dbTableName . '.'. $this.columnName` but you can customize it eg like `HOUR(log_visit.visit_last_action_time)`. * * @param string $sqlSegment diff --git a/core/Common.php b/core/Common.php index 95bc22d5d6..0e33c34bef 100644 --- a/core/Common.php +++ b/core/Common.php @@ -747,7 +747,7 @@ class Common } /** - * Returns a human readable error message in case an error occcurred during the last json encode/decode. + * Returns a human readable error message in case an error occurred during the last json encode/decode. * Returns an empty string in case there was no error. * * @return string diff --git a/core/Concurrency/LockBackend/MySqlLockBackend.php b/core/Concurrency/LockBackend/MySqlLockBackend.php index 305fae934e..a7ebe500bd 100644 --- a/core/Concurrency/LockBackend/MySqlLockBackend.php +++ b/core/Concurrency/LockBackend/MySqlLockBackend.php @@ -52,7 +52,7 @@ class MySqlLockBackend implements LockBackend // remove any existing but expired lock // todo: we could combine get() and keyExists() in one query! if ($this->keyExists($key)) { - // most of the time an expired key should not exist... we don't want to lock the row unncessarily therefore we check first + // most of the time an expired key should not exist... we don't want to lock the row unnecessarily therefore we check first // if value exists... $sql = sprintf('DELETE FROM %s WHERE `key` = ? and not (%s)', $tablePrefixed, $this->getQueryPartExpiryTime()); Db::query($sql, array($key)); diff --git a/core/CronArchive.php b/core/CronArchive.php index 7108ef9e04..4deeccfeeb 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -868,7 +868,7 @@ class CronArchive $this->logger->debug(' Invalidating custom date range ({date}) for site {idSite}', ['idSite' => $idSiteToInvalidate, 'date' => $date]); - $this->invalidateWithSegments($idSiteToInvalidate, $date, 'range', $_forceInvalidateNonexistant = true); + $this->invalidateWithSegments($idSiteToInvalidate, $date, 'range', $_forceInvalidateNonexistent = true); } $this->setInvalidationTime(); @@ -902,7 +902,7 @@ class CronArchive $this->invalidateWithSegments([$idSite], $date->toString(), 'day', false, $doNotIncludeTtlInExistingArchiveCheck = $isYesterday); } - private function invalidateWithSegments($idSites, $date, $period, $_forceInvalidateNonexistant = false, $doNotIncludeTtlInExistingArchiveCheck = false) + private function invalidateWithSegments($idSites, $date, $period, $_forceInvalidateNonexistent = false, $doNotIncludeTtlInExistingArchiveCheck = false) { if ($date instanceof Date) { $date = $date->toString(); @@ -924,7 +924,7 @@ class CronArchive $this->logger->debug(' Found usable archive for {archive}, skipping invalidation.', ['archive' => $params]); } else { $this->getApiToInvalidateArchivedReport()->invalidateArchivedReports($idSite, $date, $period, $segment = false, $cascadeDown = false, - $_forceInvalidateNonexistant); + $_forceInvalidateNonexistent); } foreach ($this->segmentArchiving->getAllSegmentsToArchive($idSite) as $segmentDefinition) { @@ -955,7 +955,7 @@ class CronArchive } $this->getApiToInvalidateArchivedReport()->invalidateArchivedReports($idSite, $date, $period, $segmentDefinition, - $cascadeDown = false, $_forceInvalidateNonexistant); + $cascadeDown = false, $_forceInvalidateNonexistent); } } } diff --git a/core/DataAccess/ArchiveSelector.php b/core/DataAccess/ArchiveSelector.php index 721163804a..ca29f4f7f4 100644 --- a/core/DataAccess/ArchiveSelector.php +++ b/core/DataAccess/ArchiveSelector.php @@ -287,7 +287,7 @@ class ArchiveSelector // select a subtable id $bind = array(); foreach ($recordNames as $recordName) { - // to be backwards compatibe we need to look for the exact idSubtable blob and for the chunk + // to be backwards compatible we need to look for the exact idSubtable blob and for the chunk // that stores the subtables (a chunk stores many blobs in one blob) $bind[] = $chunk->getRecordNameForTableId($recordName, $idSubtable); $bind[] = self::appendIdSubtable($recordName, $idSubtable); diff --git a/core/DataAccess/LogAggregator.php b/core/DataAccess/LogAggregator.php index 883dcf763d..6232cf34d9 100644 --- a/core/DataAccess/LogAggregator.php +++ b/core/DataAccess/LogAggregator.php @@ -201,9 +201,9 @@ class LogAggregator return $this->segment; } - public function setQueryOriginHint($nameOfOrigiin) + public function setQueryOriginHint($nameOfOrigin) { - $this->queryOriginHint = $nameOfOrigiin; + $this->queryOriginHint = $nameOfOrigin; } public function getSegmentTmpTableName() diff --git a/core/DataAccess/Model.php b/core/DataAccess/Model.php index 4d2199ce21..451ef64b40 100644 --- a/core/DataAccess/Model.php +++ b/core/DataAccess/Model.php @@ -117,7 +117,7 @@ class Model } public function updateArchiveAsInvalidated($archiveTable, $idSites, $allPeriodsToInvalidate, Segment $segment = null, - $forceInvalidateNonexistantRanges = false, $name = null) + $forceInvalidateNonexistentRanges = false, $name = null) { if (empty($idSites)) { return 0; @@ -220,7 +220,7 @@ class Model $siteCreationTime = Date::factory($siteCreationTime); foreach ($allPeriodsToInvalidate as $period) { if ($period->getLabel() == 'range' - && !$forceInvalidateNonexistantRanges + && !$forceInvalidateNonexistentRanges ) { continue; // range } diff --git a/core/DataTable/Filter/Truncate.php b/core/DataTable/Filter/Truncate.php index e5f4655a4e..b95233d4e0 100644 --- a/core/DataTable/Filter/Truncate.php +++ b/core/DataTable/Filter/Truncate.php @@ -104,7 +104,7 @@ class Truncate extends BaseFilter for ($i = $this->truncateAfter; $i < $count; $i++) { if (!isset($rows[$i])) { - // case when the last row is a summary row, it is not indexed by $cout but by DataTable::ID_SUMMARY_ROW + // case when the last row is a summary row, it is not indexed by $count but by DataTable::ID_SUMMARY_ROW $summaryRow = $table->getRowFromId(DataTable::ID_SUMMARY_ROW); //FIXME: I'm not sure why it could return false, but it was reported in: http://forum.piwik.org/read.php?2,89324,page=1#msg-89442 diff --git a/core/DataTable/Map.php b/core/DataTable/Map.php index 351cb4d058..1649aa93af 100644 --- a/core/DataTable/Map.php +++ b/core/DataTable/Map.php @@ -385,7 +385,7 @@ class Map implements DataTableInterface * query results into one DataTable w/ different rows differentiated by site ID. * * Note: This DataTable/Map will be destroyed and will be no longer usable after the tables have been merged into - * the new dataTable to reduce memory usage. Destroying all DataTables witihn the Map also seems to fix a + * the new dataTable to reduce memory usage. Destroying all DataTables within the Map also seems to fix a * Segmentation Fault that occurred in the AllWebsitesDashboard when having > 16k sites. * * @return DataTable|Map diff --git a/core/Plugin/Dimension/VisitDimension.php b/core/Plugin/Dimension/VisitDimension.php index 030ec18f9f..d7c2fb7bc4 100644 --- a/core/Plugin/Dimension/VisitDimension.php +++ b/core/Plugin/Dimension/VisitDimension.php @@ -176,7 +176,7 @@ abstract class VisitDimension extends Dimension /** * The `onExistingVisit` method is triggered when a visitor was recognized meaning it is not a new visitor. - * You can overwrite any previous value set by the event `onNewVisit` by implemting this event. By returning boolean + * You can overwrite any previous value set by the event `onNewVisit` by implementing this event. By returning boolean * `false` no value will be updated. * * @param Request $request @@ -349,14 +349,14 @@ abstract class VisitDimension extends Dimension } /** - * Sort a key => value array descending by the number of occurances of the key in the supplied table and column + * Sort a key => value array descending by the number of occurrences of the key in the supplied table and column * * @param array $array Key value array - * @param DataTable $table Datatable from which to count occurances + * @param DataTable $table Datatable from which to count occurrences * @param string $keyColumn Column in the datatable to match against the array key * @param int $maxValuesToReturn Limit the return array to this number of elements * - * @return array An array of values from the source array sorted by most occurances, descending + * @return array An array of values from the source array sorted by most occurrences, descending */ public function sortStaticListByUsage(array $array, DataTable $table, string $keyColumn, int $maxValuesToReturn) : array { diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php index 2fb4f14f18..53b9b37dbf 100644 --- a/core/Plugin/Report.php +++ b/core/Plugin/Report.php @@ -199,7 +199,7 @@ class Report protected $defaultSortOrderDesc = true; /** - * The constructur initializes the module, action and the default metrics. If you want to overwrite any of those + * The constructor initializes the module, action and the default metrics. If you want to overwrite any of those * values or if you want to do any work during initializing overwrite the method {@link init()}. * @ignore */ diff --git a/core/Plugin/Segment.php b/core/Plugin/Segment.php index 8fd27241b2..98079abeec 100644 --- a/core/Plugin/Segment.php +++ b/core/Plugin/Segment.php @@ -234,7 +234,7 @@ class Segment /** * Set (overwrite) the type of this segment which is usually either a 'dimension' or a 'metric'. - * @param string $type See constansts TYPE_* + * @param string $type See constants TYPE_* * @api */ public function setType($type) diff --git a/core/Plugin/Tasks.php b/core/Plugin/Tasks.php index 9503184931..2b465aa9e3 100644 --- a/core/Plugin/Tasks.php +++ b/core/Plugin/Tasks.php @@ -52,7 +52,7 @@ class Tasks * Schedule the given tasks/method to run once every hour. * * @param string $methodName The name of the method that will be called when the task is being - * exectuted. To make it work you need to create a public method having the + * executed. To make it work you need to create a public method having the * given method name in your Tasks class. * @param null|string $methodParameter Can be null if the task does not need any parameter or a string. It is not * possible to specify multiple parameters as an array etc. If you need to diff --git a/core/Settings/Measurable/MeasurableSettings.php b/core/Settings/Measurable/MeasurableSettings.php index 2230cae2bd..1826d7798f 100644 --- a/core/Settings/Measurable/MeasurableSettings.php +++ b/core/Settings/Measurable/MeasurableSettings.php @@ -78,7 +78,7 @@ abstract class MeasurableSettings extends Settings * @param mixed $defaultValue The default value for this setting. Note the value will not be converted to the * specified type. * @param string $type The PHP internal type the value of this setting should have. - * Use one of FieldConfig::TYPE_* constancts + * Use one of FieldConfig::TYPE_* constants * @param \Closure $fieldConfigCallback A callback method to configure the field that shall be displayed in the * UI to define the value for this setting * @return MeasurableSetting Returns an instance of the created measurable setting. diff --git a/core/Settings/Plugin/SystemSettings.php b/core/Settings/Plugin/SystemSettings.php index 2aed8d91dc..89ac87b11e 100644 --- a/core/Settings/Plugin/SystemSettings.php +++ b/core/Settings/Plugin/SystemSettings.php @@ -47,7 +47,7 @@ abstract class SystemSettings extends Settings * @param mixed $defaultValue The default value for this setting. Note the value will not be converted to the * specified type. * @param string $type The PHP internal type the value of this setting should have. - * Use one of FieldConfig::TYPE_* constancts + * Use one of FieldConfig::TYPE_* constants * @param \Closure $fieldConfigCallback A callback method to configure the field that shall be displayed in the * UI to define the value for this setting * @return SystemSetting Returns an instance of the created measurable setting. diff --git a/core/Settings/Plugin/UserSettings.php b/core/Settings/Plugin/UserSettings.php index e8dab3747d..00c9cd4131 100644 --- a/core/Settings/Plugin/UserSettings.php +++ b/core/Settings/Plugin/UserSettings.php @@ -47,7 +47,7 @@ abstract class UserSettings extends Settings * @param mixed $defaultValue The default value for this setting. Note the value will not be converted to the * specified type. * @param string $type The PHP internal type the value of this setting should have. - * Use one of FieldConfig::TYPE_* constancts + * Use one of FieldConfig::TYPE_* constants * @param \Closure $fieldConfigCallback A callback method to configure the field that shall be displayed in the * UI to define the value for this setting * @return UserSetting Returns an instance of the created measurable setting. diff --git a/plugins/CoreAdminHome/API.php b/plugins/CoreAdminHome/API.php index 4b0e4380c2..91f551a1d8 100644 --- a/plugins/CoreAdminHome/API.php +++ b/plugins/CoreAdminHome/API.php @@ -151,7 +151,7 @@ class API extends \Piwik\Plugin\API * @hideExceptForSuperUser */ public function invalidateArchivedReports($idSites, $dates, $period = false, $segment = false, $cascadeDown = false, - $_forceInvalidateNonexistant = false) + $_forceInvalidateNonexistent = false) { $idSites = Site::getIdSitesFromIdSitesString($idSites); if (empty($idSites)) { @@ -169,7 +169,7 @@ class API extends \Piwik\Plugin\API /** Date[]|string[] $dates */ list($dates, $invalidDates) = $this->getDatesToInvalidateFromString($dates, $period); - $invalidationResult = $this->invalidator->markArchivesAsInvalidated($idSites, $dates, $period, $segment, (bool)$cascadeDown, (bool)$_forceInvalidateNonexistant); + $invalidationResult = $this->invalidator->markArchivesAsInvalidated($idSites, $dates, $period, $segment, (bool)$cascadeDown, (bool)$_forceInvalidateNonexistent); $output = $invalidationResult->makeOutputLogs(); if ($invalidDates) { diff --git a/plugins/CoreAdminHome/tests/Framework/Mock/API.php b/plugins/CoreAdminHome/tests/Framework/Mock/API.php index c07af44fc1..a1909f5b61 100644 --- a/plugins/CoreAdminHome/tests/Framework/Mock/API.php +++ b/plugins/CoreAdminHome/tests/Framework/Mock/API.php @@ -14,7 +14,7 @@ class API extends \Piwik\Plugins\CoreAdminHome\API private $invalidatedReports = array(); public function invalidateArchivedReports($idSites, $dates, $period = false, $segment = false, $cascadeDown = false, - $_forceInvalidateNonexistant = false) + $_forceInvalidateNonexistent = false) { $this->invalidatedReports[] = func_get_args(); } |