Skip to content

Commit

Permalink
Coding Standards Fixer Bot
Browse files Browse the repository at this point in the history
  • Loading branch information
Pimcore Bot committed Dec 22, 2020
1 parent a626d8e commit f4b761d
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 20 deletions.
1 change: 0 additions & 1 deletion bundles/CoreBundle/Migrations/Version20201207132025.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

class Version20201207132025 extends AbstractPimcoreMigration
{

public function doesSqlMigrations(): bool
{
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ protected function getTenantWorkers(array $openTenantList): array
// collect all workers from all processed tenants
$this->childWorkerList = $this->childWorkerList ?? [];
$childWorkerList = [];
foreach(array_merge($this->childWorkerList, $workerList) as $worker) {
foreach (array_merge($this->childWorkerList, $workerList) as $worker) {
$childWorkerList[$worker->getTenantConfig()->getTenantName()] = $worker;
}
$this->childWorkerList = array_values($childWorkerList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ abstract class AbstractElasticSearch extends Worker\ProductCentricBatchProcessin
*/
protected $indexStoreMetaData = [];


/**
* @var int
*/
Expand Down Expand Up @@ -836,12 +835,12 @@ protected function blockIndexWrite(string $indexName)
$esClient->indices()->putSettings([
'index' => $indexName,
'body' => [
'index.blocks.write' => true
]
'index.blocks.write' => true,
],
]);

$esClient->indices()->refresh([
'index' => $indexName
'index' => $indexName,
]);
}
}
Expand All @@ -860,12 +859,12 @@ protected function unblockIndexWrite(string $indexName)
$esClient->indices()->putSettings([
'index' => $indexName,
'body' => [
'index.blocks.write' => false
]
'index.blocks.write' => false,
],
]);

$esClient->indices()->refresh([
'index' => $indexName
'index' => $indexName,
]);
}
}
Expand Down Expand Up @@ -1092,7 +1091,6 @@ public function extractMinimalSynonymFiltersTreeFromIndexSettings(array $indexSe
return $indexPart;
}


/**
* Verify if the index is currently locked.
*
Expand Down Expand Up @@ -1124,7 +1122,7 @@ protected function checkIndexLock(bool $throwException = true): bool

protected function activateIndexLock()
{
TmpStore::set(self::REINDEXING_LOCK_KEY, 1, null, 60*10);
TmpStore::set(self::REINDEXING_LOCK_KEY, 1, null, 60 * 10);
}

protected function releaseIndexLock()
Expand Down
6 changes: 3 additions & 3 deletions lib/DataObject/GridColumnConfig/Operator/AnyGetter.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getLabeledValue($element)
$result->value = null;
if ($this->attribute && method_exists($element, $getter)) {
$result->value = $element->$getter($this->getParam1());
} else if($this->attribute && method_exists($element, $fallbackGetter)) {
} elseif ($this->attribute && method_exists($element, $fallbackGetter)) {
$result->value = $element->$fallbackGetter($this->getParam1());
}

Expand Down Expand Up @@ -115,7 +115,7 @@ public function getLabeledValue($element)
foreach ($value as $o) {
if ($this->attribute && method_exists($o, $getter)) {
$subValues[] = $o->$getter($this->getParam1());
} else if ($this->attribute && method_exists($o, $fallbackGetter)) {
} elseif ($this->attribute && method_exists($o, $fallbackGetter)) {
$subValues[] = $o->$fallbackGetter($this->getParam1());
}
}
Expand All @@ -125,7 +125,7 @@ public function getLabeledValue($element)
$o = $value;
if ($this->attribute && method_exists($o, $getter)) {
$resultElementValue = $o->$getter($this->getParam1());
} else if ($this->attribute && method_exists($o, $fallbackGetter)) {
} elseif ($this->attribute && method_exists($o, $fallbackGetter)) {
$resultElementValue = $o->$fallbackGetter($this->getParam1());
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/DataObject/GridColumnConfig/Operator/DateFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function format($theValue)

if ($timestamp && $this->format) {
return date($this->format, $timestamp);
} else if ($theValue instanceof Carbon) {
} elseif ($theValue instanceof Carbon) {
return $theValue->toDateString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getLabeledValue($element)
$item = $fc->get($this->idx);
if ($item) {
$itemGetter = 'get' . ucfirst($this->colAttr);
if(method_exists($item, $itemGetter)) {
if (method_exists($item, $itemGetter)) {
$value = $item->$itemGetter();
$result->value = $value;
$result->isEmpty = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function getLabeledValue($element)
$result = new \stdClass();
$result->label = $this->label;
$result->value = $element->getProperty($this->getPropertyName());

return $result;
}

Expand Down
2 changes: 0 additions & 2 deletions lib/DataObject/GridColumnConfig/Value/DefaultValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ private function getValueForObject($object, $key, $brickType = null, $brickKey =
return $result;
}


private function getClassificationStoreValueForObject($object, $key)
{
$keyParts = explode('~', $key);
Expand Down Expand Up @@ -194,7 +193,6 @@ public function getLabeledValue($element)
// key value, ignore for now

return $this->getClassificationStoreValueForObject($element, $this->attribute);

} elseif (count($attributeParts) > 1) {
$brickType = $attributeParts[0];
$brickKey = $attributeParts[1];
Expand Down
2 changes: 1 addition & 1 deletion models/DataObject/ClassDefinition/Data/RgbaColor.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function marshal($value, $object = null, $params = [])
'value' => $rgb,
'value2' => $a,
];
} else if (is_array($value)) {
} elseif (is_array($value)) {
return [
'value' => $value[$this->getName() . '__rgb'],
'value2' => $value[$this->getName() . '__a'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
namespace Pimcore\Model\DataObject\Localizedfield;

namespace Pimcore\Model\DataObject\Localizedfield;

use Doctrine\DBAL\Exception\RetryableException;
use Exception;
Expand Down

0 comments on commit f4b761d

Please sign in to comment.