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' EDITINFO: 'Edit this file'
REMOVE: Remove REMOVE: Remove
SilverStripe\Control\ChangePasswordEmail_ss: 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' CHANGEPASSWORDTEXT1: 'You changed your password for'
CHANGEPASSWORDTEXT3: 'Change password' CHANGEPASSWORDTEXT3: 'Change password'
HELLO: Hi HELLO: Hi

View File

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

View File

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