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 Oct 29, 2020
1 parent ae148ed commit e2d8837
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bundles/AdminBundle/Controller/Admin/AssetController.php
Expand Up @@ -1330,7 +1330,7 @@ public function getImageThumbnailAction(Request $request)
if ($fileinfo) {
return $this->adminJson([
'width' => $thumbnail->getWidth(),
'height' => $thumbnail->getHeight(),]);
'height' => $thumbnail->getHeight(), ]);
}

$thumbnailFile = $thumbnail->getFileSystemPath();
Expand Down
2 changes: 1 addition & 1 deletion lib/Helper/LongRunningHelper.php
Expand Up @@ -14,8 +14,8 @@

namespace Pimcore\Helper;

use Doctrine\Persistence\ConnectionRegistry;
use Doctrine\DBAL\Connection;
use Doctrine\Persistence\ConnectionRegistry;
use Monolog\Handler\HandlerInterface;
use Psr\Log\LoggerAwareTrait;

Expand Down
1 change: 1 addition & 0 deletions lib/Localization/IntlFormatter.php
Expand Up @@ -75,6 +75,7 @@ public function getLocale()
if ($this->locale === null) {
$this->locale = $this->localeService->findLocale();
}

return $this->locale;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Translation/Translator.php
Expand Up @@ -301,7 +301,7 @@ protected function checkForEmptyTranslation($id, $translated, $parameters, $doma
} elseif ($comparisonId == $translated) {
if ($this->getCatalogue($locale)->has($normalizedId, $domain)) {
return $this->getCatalogue($locale)->get($normalizedId, $domain);
} else if($backend = $this->getBackendForDomain($domain)) {
} elseif ($backend = $this->getBackendForDomain($domain)) {
if (strlen($id) > 190) {
throw new \Exception("Message ID's longer than 190 characters are invalid!");
}
Expand Down
4 changes: 3 additions & 1 deletion models/Asset.php
Expand Up @@ -890,6 +890,7 @@ public function getFullPath()
* Returns the full path of the asset (listener aware)
*
* @return string
*
* @internal
*/
public function getFrontendFullPath()
Expand Down Expand Up @@ -1310,7 +1311,7 @@ public function setData($data)
public function getStream()
{
if ($this->stream) {
if (get_resource_type($this->stream) !== "stream") {
if (get_resource_type($this->stream) !== 'stream') {
$this->stream = null;
} else {
$streamMeta = stream_get_meta_data($this->stream);
Expand Down Expand Up @@ -1659,6 +1660,7 @@ public function setMimetype($mimetype)
* @param array $metadata for each array item: mandatory keys: name, type - optional keys: data, language
*
* @return self
*
* @internal
*
*/
Expand Down
2 changes: 1 addition & 1 deletion models/DataObject/ClassDefinition/Data/Block.php
Expand Up @@ -1059,7 +1059,7 @@ public function preGetData($object, $params = [])
{
$data = null;
$params['owner'] = $object;
$params["fieldname"] = $this->getName();
$params['fieldname'] = $this->getName();
if ($object instanceof DataObject\Concrete) {
$data = $object->getObjectVar($this->getName());
if ($this->getLazyLoading() && !$object->isLazyKeyLoaded($this->getName())) {
Expand Down
1 change: 0 additions & 1 deletion models/DataObject/ClassDefinition/Data/Link.php
Expand Up @@ -232,7 +232,6 @@ public function unmarshal($data, $object = null, $params = [])
return parent::unmarshal($data, $object, $params);
}


/**
* Checks if data is valid for current data field
*
Expand Down
4 changes: 2 additions & 2 deletions models/Document/Link.php
Expand Up @@ -350,7 +350,7 @@ public function getHtml()
'title',
'accesskey',
'tabindex',
'rel' => 'relation'
'rel' => 'relation',
];

$link = $this->getLink();
Expand All @@ -360,7 +360,7 @@ public function getHtml()
foreach ($attributes as $key => $name) {
$key = is_numeric($key) ? $name : $key;
$value = $this->getProperty('navigation_' . $name);
if($value) {
if ($value) {
$attribs[] = $key . '="' . $value . '"';
}
}
Expand Down
Expand Up @@ -312,8 +312,8 @@ public function testLocalizedBrickAttributes()
$relations = $this->loadMetadataRelations('ladvancedObjects');
$brick = new LazyLoadingLocalizedTest($object);

$brick->getLocalizedfields()->setLocalizedValue('ladvancedObjects',$relations,'en');
$brick->getLocalizedfields()->setLocalizedValue('ladvancedObjects',$relations,'de');
$brick->getLocalizedfields()->setLocalizedValue('ladvancedObjects', $relations, 'en');
$brick->getLocalizedfields()->setLocalizedValue('ladvancedObjects', $relations, 'de');

$object->getBricks()->setLazyLoadingLocalizedTest($brick);
$object->save();
Expand All @@ -335,7 +335,6 @@ public function testLocalizedBrickAttributes()
$this->assertTrue(count($object->getBricks()->getLazyLoadingLocalizedTest()->getLadvancedObjects('en')) > 0);
$this->assertTrue(count($object->getBricks()->getLazyLoadingLocalizedTest()->getLadvancedObjects('de')) > 0);


$parentId = $object->getId();
$childId = $this->createChildDataObject($object)->getId();

Expand Down
5 changes: 2 additions & 3 deletions tests/Model/LazyLoading/AdvancedManyToManyRelationTest.php
Expand Up @@ -313,8 +313,8 @@ public function testLocalizedBrickAttributes()
$brick = new LazyLoadingLocalizedTest($object);
$relations = $this->loadMetadataRelations('ladvancedRelations');

$brick->getLocalizedfields()->setLocalizedValue('ladvancedRelations', $relations, 'en' );
$brick->getLocalizedfields()->setLocalizedValue('ladvancedRelations', $relations, 'de' );
$brick->getLocalizedfields()->setLocalizedValue('ladvancedRelations', $relations, 'en');
$brick->getLocalizedfields()->setLocalizedValue('ladvancedRelations', $relations, 'de');

$object->getBricks()->setLazyLoadingLocalizedTest($brick);
$object->save();
Expand All @@ -337,7 +337,6 @@ public function testLocalizedBrickAttributes()
$this->assertTrue(count($object->getBricks()->getLazyLoadingLocalizedTest()->getLadvancedRelations('en')) > 0);
$this->assertTrue(count($object->getBricks()->getLazyLoadingLocalizedTest()->getLadvancedRelations('de')) > 0);


$parentId = $object->getId();
$childId = $this->createChildDataObject($object)->getId();

Expand Down

0 comments on commit e2d8837

Please sign in to comment.