Skip to content

Commit d38a8ff

Browse files
authored
native function final (#41427)
1 parent 9bfa92e commit d38a8ff

File tree

829 files changed

+1980
-1978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

829 files changed

+1980
-1978
lines changed

.php-cs-fixer.dist.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
8787
// There should not be useless else cases
8888
'no_useless_else' => true,
89+
// Native function invocation
90+
'native_function_invocation' => ['include' => ['@compiler_optimized']],
8991
]
9092
)
9193
->setFinder($finder);

administrator/components/com_actionlogs/services/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @license GNU General Public License version 2 or later; see LICENSE.txt
99
*/
1010

11-
defined('_JEXEC') or die;
11+
\defined('_JEXEC') or die;
1212

1313
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
1414
use Joomla\CMS\Extension\ComponentInterface;

administrator/components/com_admin/postinstall/behindproxy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ function admin_postinstall_behindproxy_condition()
3434
return false;
3535
}
3636

37-
if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
37+
if (\array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
3838
return true;
3939
}
4040

41-
if (array_key_exists('HTTP_CLIENT_IP', $_SERVER) && !empty($_SERVER['HTTP_CLIENT_IP'])) {
41+
if (\array_key_exists('HTTP_CLIENT_IP', $_SERVER) && !empty($_SERVER['HTTP_CLIENT_IP'])) {
4242
return true;
4343
}
4444

administrator/components/com_admin/script.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected function collectError(string $context, \Throwable $error)
8181
// The errorCollector are required
8282
// However when someone already running the script manually the code may fail.
8383
if ($this->errorCollector) {
84-
call_user_func($this->errorCollector, $context, $error);
84+
\call_user_func($this->errorCollector, $context, $error);
8585
} else {
8686
Log::add($error->getMessage(), Log::ERROR, 'Update');
8787
}
@@ -104,7 +104,7 @@ public function preflight($action, $installer)
104104
if (!empty($installer->extension->manifest_cache)) {
105105
$manifestValues = json_decode($installer->extension->manifest_cache, true);
106106

107-
if (array_key_exists('version', $manifestValues)) {
107+
if (\array_key_exists('version', $manifestValues)) {
108108
$this->fromVersion = $manifestValues['version'];
109109

110110
return true;
@@ -2463,11 +2463,11 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
24632463

24642464
$this->fixFilenameCasing();
24652465

2466-
if ($suppressOutput === false && count($status['folders_errors'])) {
2466+
if ($suppressOutput === false && \count($status['folders_errors'])) {
24672467
echo implode('<br>', $status['folders_errors']);
24682468
}
24692469

2470-
if ($suppressOutput === false && count($status['files_errors'])) {
2470+
if ($suppressOutput === false && \count($status['files_errors'])) {
24712471
echo implode('<br>', $status['files_errors']);
24722472
}
24732473

@@ -2772,7 +2772,7 @@ private function migrateTinymceConfiguration(): bool
27722772
$replace = ['blocks', 'fontfamily', 'fontsize', 'styles'];
27732773

27742774
// Don't redo the template
2775-
if (!in_array('jtemplate', $params['configuration']['toolbars'][$setIdx]['menu'])) {
2775+
if (!\in_array('jtemplate', $params['configuration']['toolbars'][$setIdx]['menu'])) {
27762776
$search[] = 'template';
27772777
$replace[] = 'jtemplate';
27782778
}
@@ -2796,7 +2796,7 @@ private function migrateTinymceConfiguration(): bool
27962796
$replace = ['fontfamily', 'fontsize', 'blocks', 'styles'];
27972797

27982798
// Don't redo the template
2799-
if (!in_array('jtemplate', $params['configuration']['toolbars'][$setIdx][$toolbarIdx])) {
2799+
if (!\in_array('jtemplate', $params['configuration']['toolbars'][$setIdx][$toolbarIdx])) {
28002800
$search[] = 'template';
28012801
$replace[] = 'jtemplate';
28022802
}
@@ -2932,7 +2932,7 @@ protected function fixFilenameCasing()
29322932
// Check if case-insensitive file system, eg on OSX.
29332933
if (fileinode($oldRealpath) === fileinode($newRealpath)) {
29342934
// Check deeper because even realpath or glob might not return the actual case.
2935-
if (!in_array($expectedBasename, scandir(dirname($newRealpath)))) {
2935+
if (!\in_array($expectedBasename, scandir(\dirname($newRealpath)))) {
29362936
// Rename the file.
29372937
File::move(JPATH_ROOT . $old, JPATH_ROOT . $old . '.tmp');
29382938
File::move(JPATH_ROOT . $old . '.tmp', JPATH_ROOT . $expected);

administrator/components/com_admin/services/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @license GNU General Public License version 2 or later; see LICENSE.txt
99
*/
1010

11-
defined('_JEXEC') or die;
11+
\defined('_JEXEC') or die;
1212

1313
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
1414
use Joomla\CMS\Extension\ComponentInterface;

administrator/components/com_admin/src/Model/SysinfoModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ private function addDirectory(string $name, string $path, string $message = ''):
679679
*/
680680
public function &getEditor(): string
681681
{
682-
if (!is_null($this->editor)) {
682+
if (!\is_null($this->editor)) {
683683
return $this->editor;
684684
}
685685

administrator/components/com_ajax/ajax.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
* @license GNU General Public License version 2 or later; see LICENSE.txt
99
*/
1010

11-
defined('_JEXEC') or die;
11+
\defined('_JEXEC') or die;
1212

1313
require_once JPATH_SITE . '/components/com_ajax/ajax.php';

administrator/components/com_associations/services/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @license GNU General Public License version 2 or later; see LICENSE.txt
99
*/
1010

11-
defined('_JEXEC') or die;
11+
\defined('_JEXEC') or die;
1212

1313
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
1414
use Joomla\CMS\Extension\ComponentInterface;

administrator/components/com_banners/services/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @license GNU General Public License version 2 or later; see LICENSE.txt
99
*/
1010

11-
defined('_JEXEC') or die;
11+
\defined('_JEXEC') or die;
1212

1313
use Joomla\CMS\Categories\CategoryFactoryInterface;
1414
use Joomla\CMS\Component\Router\RouterFactoryInterface;

administrator/components/com_cache/services/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @license GNU General Public License version 2 or later; see LICENSE.txt
99
*/
1010

11-
defined('_JEXEC') or die;
11+
\defined('_JEXEC') or die;
1212

1313
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
1414
use Joomla\CMS\Extension\ComponentInterface;

0 commit comments

Comments
 (0)