Skip to content

Commit 984f2ec

Browse files
committed
Apply "combine_consecutive_issets" CS rule
1 parent 5f1e50b commit 984f2ec

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
'@Symfony' => true,
1717
'array_syntax' => ['syntax' => 'short'],
1818
'blank_line_before_statement' => true,
19+
'combine_consecutive_issets' => true,
1920
'is_null' => false,
2021
'list_syntax' => ['syntax' => 'short'],
2122
'modernize_types_casting' => true,

src/References/Mapping/Driver/Yaml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function readExtendedMetadata($meta, array &$config)
3131
{
3232
$mapping = $this->_getMapping($meta->name);
3333

34-
if (isset($mapping['gedmo']) && isset($mapping['gedmo']['reference'])) {
34+
if (isset($mapping['gedmo'], $mapping['gedmo']['reference'])) {
3535
foreach ($mapping['gedmo']['reference'] as $field => $fieldMapping) {
3636
$reference = $fieldMapping['reference'];
3737

src/Tree/Entity/Repository/ClosureTreeRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ public function getNodesHierarchyQueryBuilder($node = null, $direct = false, arr
382382
$options = array_merge($defaultOptions, $options);
383383

384384
if (isset($options['childSort']) && is_array($options['childSort']) &&
385-
isset($options['childSort']['field']) && isset($options['childSort']['dir'])) {
385+
isset($options['childSort']['field'], $options['childSort']['dir'])) {
386386
$q->addOrderBy(
387387
'node.'.$options['childSort']['field'],
388388
'asc' == strtolower($options['childSort']['dir']) ? 'asc' : 'desc'

src/Tree/Strategy/ORM/Nested.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ public function processScheduledUpdate($em, $node, AdapterInterface $ea)
143143
$uow = $em->getUnitOfWork();
144144

145145
$changeSet = $uow->getEntityChangeSet($node);
146-
if (isset($config['root']) && isset($changeSet[$config['root']])) {
146+
if (isset($config['root'], $changeSet[$config['root']])) {
147147
throw new \Gedmo\Exception\UnexpectedValueException('Root cannot be changed manually, change parent instead');
148148
}
149149

150150
$oid = spl_object_id($node);
151-
if (isset($changeSet[$config['left']]) && isset($this->nodePositions[$oid])) {
151+
if (isset($changeSet[$config['left']], $this->nodePositions[$oid])) {
152152
$wrapped = AbstractWrapper::wrap($node, $em);
153153
$parent = $wrapped->getPropertyValue($config['parent']);
154154
// revert simulated changeset

0 commit comments

Comments
 (0)