REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.59 KB
Close
/opt/cpanel/ea-wappspector/vendor/rector/rector/src/Util/ArrayParametersMerger.php
Text
Base64
<?php declare (strict_types=1); namespace Rector\Util; final class ArrayParametersMerger { /** * Merges configurations. Left has higher priority than right one. * * @autor David Grudl (https://davidgrudl.com) * @source https://github.com/nette/di/blob/8eb90721a131262f17663e50aee0032a62d0ef08/src/DI/Config/Helpers.php#L31 * @param mixed $left * @param mixed $right * @return mixed */ public function merge($left, $right) { if (\is_array($left) && \is_array($right)) { return $this->mergeLeftToRightWithCallable($left, $right, function ($leftValue, $rightValue) { return $this->merge($leftValue, $rightValue); }); } if ($left !== null) { return $left; } if (!\is_array($right)) { return $left; } return $right; } /** * @param array<int|string, mixed> $left * @param array<int|string, mixed> $right * @return mixed[] */ private function mergeLeftToRightWithCallable(array $left, array $right, callable $mergeCallback) : array { foreach ($left as $key => $val) { if (\is_int($key)) { // prevent duplicated values in unindexed arrays if (!\in_array($val, $right, \true)) { $right[] = $val; } } else { if (isset($right[$key])) { $val = $mergeCallback($val, $right[$key]); } $right[$key] = $val; } } return $right; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Reflection
DIR
-
drwxr-xr-x
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ArrayChecker.php
466 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ArrayParametersMerger.php
1.59 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FileHasher.php
1.13 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MemoryLimiter.php
1.40 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NewLineSplitter.php
431 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NodePrinter.php
1.63 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PhpVersionFactory.php
665 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StringUtils.php
294 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).