Merge pull request #9786 from creative-commoners/pulls/4.7/quote-yaml-string

MNT Double quote yaml string, fix phpcs warnings
This commit is contained in:
Serge Latyntsev 2020-12-01 13:46:39 +13:00 committed by GitHub
commit 551fa272e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 15 deletions

View File

@ -7,7 +7,7 @@ en:
EDITINFO: 'Edit this file'
REMOVE: Remove
SilverStripe\Control\ChangePasswordEmail_ss:
CHANGEPASSWORDFOREMAIL: 'The password for account with email address {email} has been changed. If you didn\''t change your password please change your password using the link below'
CHANGEPASSWORDFOREMAIL: "The password for account with email address {email} has been changed. If you didn't change your password please change your password using the link below"
CHANGEPASSWORDTEXT1: 'You changed your password for'
CHANGEPASSWORDTEXT3: 'Change password'
HELLO: Hi

View File

@ -285,12 +285,10 @@ trait CustomMethods
$methodInfo = self::$extra_methods[$class][$method];
if (
// always check for property
(isset($methodInfo['property']) && $methodInfo['property'] === $property) &&
// check for index only if provided
(!$index || ($index && isset($methodInfo['index']) && $methodInfo['index'] === $index))
) {
// always check for property, AND
// check for index only if provided
if ((isset($methodInfo['property']) && $methodInfo['property'] === $property) &&
(!$index || ($index && isset($methodInfo['index']) && $methodInfo['index'] === $index))) {
unset(self::$extra_methods[$class][$method]);
}
}

View File

@ -179,14 +179,11 @@ class StandardRelatedDataService implements RelatedDataService
$class = get_class($record);
foreach ($record->manyMany() as $component => $componentClass) {
$componentClass = $this->updateComponentClass($componentClass, $throughClasses);
if (
// Ignore belongs_many_many_through with dot syntax
strpos($componentClass, '.') !== false ||
// Prevent duplicate counting of self-referential relations e.g.
// MyFile::$many_many = [ 'MyFile' => MyFile::class ]
// This relation will still be counted in $this::addRelatedReverseManyManys()
$record instanceof $componentClass
) {
// Ignore belongs_many_many_through with dot syntax, AND
// Prevent duplicate counting of self-referential relations e.g.
// MyFile::$many_many = [ 'MyFile' => MyFile::class ]
// This relation will still be counted in $this::addRelatedReverseManyManys()
if (strpos($componentClass, '.') !== false || $record instanceof $componentClass) {
continue;
}
$results = $this->fetchManyManyResults($record, $class, $component, false);