Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brusch authored and github-actions[bot] committed Apr 13, 2023
1 parent 1a7de86 commit 7821f65
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
Expand Up @@ -335,7 +335,7 @@ public function doGetGridColumnConfig(Request $request, Config $config, $isDelet
}
$userIds = implode(',', $userIds);
$shared = ($savedGridConfig->getOwnerId() != $userId && $savedGridConfig->isShareGlobally()) || $db->fetchOne('select 1 from gridconfig_shares where sharedWithUserId IN ('.$userIds.') and gridConfigId = '.$savedGridConfig->getId());
// $shared = $savedGridConfig->isShareGlobally() || GridConfigShare::getByGridConfigAndSharedWithId($savedGridConfig->getId(), $this->getUser()->getId());
// $shared = $savedGridConfig->isShareGlobally() || GridConfigShare::getByGridConfigAndSharedWithId($savedGridConfig->getId(), $this->getUser()->getId());

if (!$shared && $savedGridConfig->getOwnerId() != $this->getAdminUser()->getId()) {
throw new \Exception('You are neither the owner of this config nor it is shared with you');
Expand Down
Expand Up @@ -116,8 +116,8 @@ public function findAction(Request $request, EventDispatcherInterface $eventDisp
$parts = explode('~', $f);
if (substr($f, 0, 1) == '~') {
// $type = $parts[1];
// $field = $parts[2];
// $keyid = $parts[3];
// $field = $parts[2];
// $keyid = $parts[3];
// key value, ignore for now
} elseif (count($parts) > 1) {
$bricks[$parts[0]] = $parts[0];
Expand Down
6 changes: 3 additions & 3 deletions models/DataObject/ClassDefinition/Data/Fieldcollections.php
Expand Up @@ -552,9 +552,9 @@ public function getGetterCode($class)
// TODO else part should not be needed at all as preGetData is always there
// if ($this instanceof PreGetDataInterface || method_exists($this, 'preGetData')) {
$code .= "\t" . '$data = $this->getClass()->getFieldDefinition("' . $key . '")->preGetData($this);' . "\n";
// } else {
// $code .= "\t" . '$data = $this->' . $key . ";\n";
// }
// } else {
// $code .= "\t" . '$data = $this->' . $key . ";\n";
// }

$code .= "\t" . 'return $data;' . "\n";
$code .= "}\n\n";
Expand Down
8 changes: 4 additions & 4 deletions models/Element/Service.php
Expand Up @@ -863,10 +863,10 @@ public static function renewReferences($data, $initial = true, $key = null)

if ($originalElement) {
//do not override filename for Assets https://github.com/pimcore/pimcore/issues/8316
// if ($data instanceof Asset) {
// /** @var Asset $originalElement */
// $data->setFilename($originalElement->getFilename());
// } else
// if ($data instanceof Asset) {
// /** @var Asset $originalElement */
// $data->setFilename($originalElement->getFilename());
// } else
if ($data instanceof Document) {
/** @var Document $originalElement */
$data->setKey($originalElement->getKey());
Expand Down
6 changes: 3 additions & 3 deletions tests/Ecommerce/PricingManager/Rule/AbstractRuleTest.php
Expand Up @@ -370,9 +370,9 @@ protected function buildRules($ruleDefinitions)
$rule->setCondition($condition);
}

// if($ruleDefinition['condition']) {
// $rule->setValue("condition", $ruleDefinition['condition']);
// }
// if($ruleDefinition['condition']) {
// $rule->setValue("condition", $ruleDefinition['condition']);
// }

$rules[] = $rule;
}
Expand Down
Binary file modified tests/Ecommerce/PricingManager/RuleTest.php
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/Unit/Translation/TranslatorTest.php
Expand Up @@ -134,8 +134,8 @@ public function testTranslateTextAsKey()
$this->assertEquals($this->translations['en']['simple_key'], $this->translator->trans('Text As Key'));

//Returns Key value (no translation + no fallback)
// $this->translator->setLocale('fr');
// $this->assertEquals('Text As Key', $this->translator->trans('Text As Key'));
// $this->translator->setLocale('fr');
// $this->assertEquals('Text As Key', $this->translator->trans('Text As Key'));
}

public function testTranslateTextWithParams()
Expand Down

0 comments on commit 7821f65

Please sign in to comment.