mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
[TriggerExtractor] add simple check for the other message
This commit is contained in:
parent
2d63816d43
commit
08600382c2
@ -72,6 +72,11 @@ final class TriggerMessageResolver
|
||||
if (! Strings::startsWith($word, $class)) {
|
||||
$word = $class . '::' . $word;
|
||||
}
|
||||
// is method('...')
|
||||
} elseif (Strings::endsWith($word,'\')')) {
|
||||
if (! Strings::startsWith($word, $class)) {
|
||||
$word = $class . '::' . $word;
|
||||
}
|
||||
}
|
||||
|
||||
$completeMessage .= ' ' . $word;
|
||||
|
@ -32,11 +32,17 @@ final class TriggerExtractorTest extends AbstractContainerAwareTestCase
|
||||
$this->assertCount(2, $deprecations);
|
||||
|
||||
$setClassToSetFacoryDeprecation = $deprecations[0];
|
||||
$injectMethodToTagDeprecation = $deprecations[1];
|
||||
|
||||
$this->assertSame(
|
||||
'Nette\DI\Definition::setClass() second parameter $args is deprecated,'
|
||||
. ' use Nette\DI\Definition::setFactory()',
|
||||
$setClassToSetFacoryDeprecation
|
||||
);
|
||||
|
||||
$this->assertSame(
|
||||
'Nette\DI\Definition::setInject() is deprecated, use Nette\DI\Definition::addTag(\'inject\')',
|
||||
$injectMethodToTagDeprecation
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user