Skip to content

Commit

Permalink
Updated Rector to commit e35497e40a8f71ef8c602759922457289d06821a
Browse files Browse the repository at this point in the history
rectorphp/rector-src@e35497e [Php81] Allow explicit mixed processed on trait on NullToStrictStringFuncCallArgRector (#3212)
  • Loading branch information
TomasVotruba committed Dec 17, 2022
1 parent a53b9ef commit e1a1e9a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private function processNullToStrictStringOnNodePosition(FuncCall $funcCall, arr
if ($this->isAnErrorTypeFromParentScope($argValue)) {
return null;
}
if ($this->shouldSkipTrait($argValue, $isTrait)) {
if ($this->shouldSkipTrait($argValue, $type, $isTrait)) {
return null;
}
if ($this->isCastedReassign($argValue)) {
Expand All @@ -175,12 +175,18 @@ private function processNullToStrictStringOnNodePosition(FuncCall $funcCall, arr
$funcCall->args = $args;
return $funcCall;
}
private function shouldSkipTrait(Expr $expr, bool $isTrait) : bool
private function shouldSkipTrait(Expr $expr, MixedType $mixedType, bool $isTrait) : bool
{
if (!$isTrait) {
return \false;
}
if ($mixedType->isExplicitMixed()) {
return \false;
}
if (!$expr instanceof MethodCall) {
return $isTrait && $this->propertyFetchAnalyzer->isLocalPropertyFetch($expr);
return $this->propertyFetchAnalyzer->isLocalPropertyFetch($expr);
}
return $isTrait;
return \true;
}
private function isCastedReassign(Expr $expr) : bool
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'dfad0c3a53d7ee62aa0ea6e6feede26ada741c58';
public const PACKAGE_VERSION = 'e35497e40a8f71ef8c602759922457289d06821a';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2022-12-17 15:37:03';
public const RELEASE_DATE = '2022-12-17 21:44:31';
/**
* @var int
*/
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInite0f7a49cde01988aabc4ed685fc054f4::getLoader();
return ComposerAutoloaderInitf01ea4519dceb00097b8c238dd1eb7f7::getLoader();
14 changes: 7 additions & 7 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInite0f7a49cde01988aabc4ed685fc054f4
class ComposerAutoloaderInitf01ea4519dceb00097b8c238dd1eb7f7
{
private static $loader;

Expand All @@ -22,19 +22,19 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInite0f7a49cde01988aabc4ed685fc054f4', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitf01ea4519dceb00097b8c238dd1eb7f7', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInite0f7a49cde01988aabc4ed685fc054f4', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitf01ea4519dceb00097b8c238dd1eb7f7', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInite0f7a49cde01988aabc4ed685fc054f4::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitf01ea4519dceb00097b8c238dd1eb7f7::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$includeFiles = \Composer\Autoload\ComposerStaticInite0f7a49cde01988aabc4ed685fc054f4::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInitf01ea4519dceb00097b8c238dd1eb7f7::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiree0f7a49cde01988aabc4ed685fc054f4($fileIdentifier, $file);
composerRequiref01ea4519dceb00097b8c238dd1eb7f7($fileIdentifier, $file);
}

return $loader;
Expand All @@ -46,7 +46,7 @@ public static function getLoader()
* @param string $file
* @return void
*/
function composerRequiree0f7a49cde01988aabc4ed685fc054f4($fileIdentifier, $file)
function composerRequiref01ea4519dceb00097b8c238dd1eb7f7($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInite0f7a49cde01988aabc4ed685fc054f4
class ComposerStaticInitf01ea4519dceb00097b8c238dd1eb7f7
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -3055,9 +3055,9 @@ class ComposerStaticInite0f7a49cde01988aabc4ed685fc054f4
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInite0f7a49cde01988aabc4ed685fc054f4::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInite0f7a49cde01988aabc4ed685fc054f4::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInite0f7a49cde01988aabc4ed685fc054f4::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitf01ea4519dceb00097b8c238dd1eb7f7::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf01ea4519dceb00097b8c238dd1eb7f7::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf01ea4519dceb00097b8c238dd1eb7f7::$classMap;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit e1a1e9a

Please sign in to comment.