Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions libraries/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -798,31 +798,31 @@
},
{
"name": "joomla/string",
"version": "1.4.1",
"version_normalized": "1.4.1.0",
"version": "1.4.2",
"version_normalized": "1.4.2.0",
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/string.git",
"reference": "66363d317e6c020f30a70265c129281c77c43ca0"
"reference": "64ed484157262578b8daddb488bb9bd3552bc4fe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/string/zipball/66363d317e6c020f30a70265c129281c77c43ca0",
"reference": "66363d317e6c020f30a70265c129281c77c43ca0",
"url": "https://api.github.com/repos/joomla-framework/string/zipball/64ed484157262578b8daddb488bb9bd3552bc4fe",
"reference": "64ed484157262578b8daddb488bb9bd3552bc4fe",
"shasum": ""
},
"require": {
"php": "^5.3.10|~7.0"
},
"require-dev": {
"joomla/coding-standards": "~2.0@alpha",
"joomla/test": "~1.0",
"phpunit/phpunit": "~4.8|~5.0",
"squizlabs/php_codesniffer": "1.*"
"phpunit/phpunit": "^4.8.35|^5.4.3|~6.0"
},
"suggest": {
"ext-mbstring": "For improved processing"
},
"time": "2016-12-10T18:13:42+00:00",
"time": "2019-06-16T18:18:09+00:00",
"type": "joomla-package",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -854,7 +854,7 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0+"
"GPL-2.0-or-later"
],
"description": "Joomla String Package",
"homepage": "https://github.com/joomla-framework/string",
Expand Down
79 changes: 40 additions & 39 deletions libraries/vendor/joomla/string/src/Inflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Part of the Joomla Framework String Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down Expand Up @@ -35,35 +35,35 @@ class Inflector
*/
private $rules = array(
'singular' => array(
'/(matr)ices$/i' => '\1ix',
'/(vert|ind)ices$/i' => '\1ex',
'/(matr)ices$/i' => '\1ix',
'/(vert|ind)ices$/i' => '\1ex',
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us',
'/([ftw]ax)es/i' => '\1',
'/(cris|ax|test)es$/i' => '\1is',
'/(shoe|slave)s$/i' => '\1',
'/(o)es$/i' => '\1',
'/([^aeiouy]|qu)ies$/i' => '\1y',
'/$1ses$/i' => '\s',
'/ses$/i' => '\s',
'/eaus$/' => 'eau',
'/^(.*us)$/' => '\\1',
'/s$/i' => '',
'/([ftw]ax)es/i' => '\1',
'/(cris|ax|test)es$/i' => '\1is',
'/(shoe|slave)s$/i' => '\1',
'/(o)es$/i' => '\1',
'/([^aeiouy]|qu)ies$/i' => '\1y',
'/$1ses$/i' => '\s',
'/ses$/i' => '\s',
'/eaus$/' => 'eau',
'/^(.*us)$/' => '\\1',
'/s$/i' => '',
),
'plural' => array(
'/([m|l])ouse$/i' => '\1ice',
'/(matr|vert|ind)(ix|ex)$/i' => '\1ices',
'/(x|ch|ss|sh)$/i' => '\1es',
'/([^aeiouy]|qu)y$/i' => '\1ies',
'/([^aeiouy]|qu)ies$/i' => '\1y',
'/(?:([^f])fe|([lr])f)$/i' => '\1\2ves',
'/sis$/i' => 'ses',
'/([ti])um$/i' => '\1a',
'/(buffal|tomat)o$/i' => '\1\2oes',
'/([m|l])ouse$/i' => '\1ice',
'/(matr|vert|ind)(ix|ex)$/i' => '\1ices',
'/(x|ch|ss|sh)$/i' => '\1es',
'/([^aeiouy]|qu)y$/i' => '\1ies',
'/([^aeiouy]|qu)ies$/i' => '\1y',
'/(?:([^f])fe|([lr])f)$/i' => '\1\2ves',
'/sis$/i' => 'ses',
'/([ti])um$/i' => '\1a',
'/(buffal|tomat)o$/i' => '\1\2oes',
'/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i' => '\1i',
'/us$/i' => 'uses',
'/(ax|cris|test)is$/i' => '\1es',
'/s$/i' => 's',
'/$/' => 's',
'/us$/i' => 'uses',
'/(ax|cris|test)is$/i' => '\1es',
'/s$/i' => 's',
'/$/' => 's',
),
'countable' => array(
'id',
Expand All @@ -77,7 +77,7 @@ class Inflector
*
* The array is in the form [singular => plural]
*
* @var array
* @var string[]
* @since 1.0
*/
private $cache = array();
Expand Down Expand Up @@ -129,11 +129,11 @@ protected function __construct()
*/
private function addRule($data, $ruleType)
{
if (is_string($data))
if (\is_string($data))
{
$data = array($data);
}
elseif (!is_array($data))
elseif (!\is_array($data))
{
// Do not translate.
throw new InvalidArgumentException('Invalid inflector rule data.');
Expand All @@ -151,7 +151,7 @@ private function addRule($data, $ruleType)
*
* @param string $singular A singular form of a word.
*
* @return mixed The cached inflection or false if none found.
* @return string|boolean The cached inflection or false if none found.
*
* @since 1.0
*/
Expand All @@ -173,7 +173,7 @@ private function getCachedPlural($singular)
*
* @param string $plural A plural form of a word.
*
* @return mixed The cached inflection or false if none found.
* @return string|boolean The cached inflection or false if none found.
*
* @since 1.0
*/
Expand All @@ -193,7 +193,7 @@ private function getCachedSingular($plural)
* @param string $word The string input.
* @param string $ruleType String (eg, singular|plural)
*
* @return mixed An inflected string, or false if no rule could be applied.
* @return string|boolean An inflected string, or false if no rule could be applied.
*
* @since 1.0
*/
Expand All @@ -202,7 +202,7 @@ private function matchRegexRule($word, $ruleType)
// Cycle through the regex rules.
foreach ($this->rules[$ruleType] as $regex => $replacement)
{
$matches = 0;
$matches = 0;
$matchedWord = preg_replace($regex, $replacement, $word, -1, $matches);

if ($matches > 0)
Expand Down Expand Up @@ -321,7 +321,8 @@ public static function getInstance($new = false)
{
return new static;
}
elseif (!is_object(self::$instance))

if (!\is_object(self::$instance))
{
self::$instance = new static;
}
Expand All @@ -340,7 +341,7 @@ public static function getInstance($new = false)
*/
public function isCountable($word)
{
return (boolean) in_array($word, $this->rules['countable']);
return \in_array($word, $this->rules['countable']);
}

/**
Expand All @@ -354,7 +355,7 @@ public function isCountable($word)
*/
public function isPlural($word)
{
// Try the cache for an known inflection.
// Try the cache for a known inflection.
$inflection = $this->getCachedSingular($word);

if ($inflection !== false)
Expand Down Expand Up @@ -384,7 +385,7 @@ public function isPlural($word)
*/
public function isSingular($word)
{
// Try the cache for an known inflection.
// Try the cache for a known inflection.
$inflection = $this->getCachedPlural($word);

if ($inflection !== false)
Expand All @@ -408,7 +409,7 @@ public function isSingular($word)
*
* @param string $word The singular word to pluralise.
*
* @return mixed An inflected string, or false if no rule could be applied.
* @return string|boolean An inflected string, or false if no rule could be applied.
*
* @since 1.0
*/
Expand Down Expand Up @@ -447,7 +448,7 @@ public function toPlural($word)
*
* @param string $word The plural word to singularise.
*
* @return mixed An inflected string, or false if no rule could be applied.
* @return string|boolean An inflected string, or false if no rule could be applied.
*
* @since 1.0
*/
Expand Down
2 changes: 1 addition & 1 deletion libraries/vendor/joomla/string/src/Normalise.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Part of the Joomla Framework String Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion libraries/vendor/joomla/string/src/String.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Part of the Joomla Framework String Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

Expand Down
Loading