Skip to content

Commit cd5268a

Browse files
phansysfranmomu
authored andcommitted
Apply "blank_line_before_statement" CS rule
1 parent 6e97afb commit cd5268a

File tree

24 files changed

+47
-0
lines changed

24 files changed

+47
-0
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
'@PSR2' => true,
1616
'@Symfony' => true,
1717
'array_syntax' => ['syntax' => 'short'],
18+
'blank_line_before_statement' => true,
1819
'is_null' => false,
1920
'list_syntax' => ['syntax' => 'short'],
2021
'modernize_types_casting' => true,

src/Blameable/BlameableListener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function getFieldValue($meta, $field, $eventAdapter)
4242
if (method_exists($this->user, '__toString')) {
4343
return $this->user->__toString();
4444
}
45+
4546
throw new InvalidArgumentException('Field expects string, user must be a string, or object should have method getUsername or __toString');
4647
}
4748

src/Loggable/Document/Repository/LogEntryRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ private function getLoggableListener()
144144
foreach ($listeners as $hash => $listener) {
145145
if ($listener instanceof LoggableListener) {
146146
$this->listener = $listener;
147+
147148
break;
148149
}
149150
}

src/Loggable/Entity/Repository/LogEntryRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ private function getLoggableListener()
145145
foreach ($listeners as $hash => $listener) {
146146
if ($listener instanceof LoggableListener) {
147147
$this->listener = $listener;
148+
148149
break;
149150
}
150151
}

src/Loggable/Mapping/Driver/Annotation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function readExtendedMetadata($meta, array &$config)
7474
}
7575
if (isset($meta->embeddedClasses[$field])) {
7676
$this->inspectEmbeddedForVersioned($field, $config, $meta);
77+
7778
continue;
7879
}
7980
// fields cannot be overrided and throws mapping exception

src/Mapping/Driver/Xml.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ protected function _getBooleanAttribute(SimpleXmlElement $node, $attributeName)
5959
if ('0' === $rawValue || 'false' === $rawValue) {
6060
return false;
6161
}
62+
6263
throw new InvalidMappingException(sprintf("Attribute %s must have a valid boolean value, '%s' found", $attributeName, $this->_getAttribute($node, $attributeName)));
6364
}
6465

src/Mapping/MappedEventSubscriber.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ protected function getEventAdapter(EventArgs $args)
104104

105105
return $this->adapters[$m[1]];
106106
}
107+
107108
throw new \Gedmo\Exception\InvalidArgumentException('Event mapper does not support event arg class: '.$class);
108109
}
109110

@@ -196,6 +197,7 @@ public function setAnnotationReader($reader)
196197
public function loadMetadataForObjectClass(ObjectManager $objectManager, $metadata)
197198
{
198199
$factory = $this->getExtensionMetadataFactory($objectManager);
200+
199201
try {
200202
$config = $factory->getExtensionMetadata($metadata);
201203
} catch (\ReflectionException $e) {

src/Sluggable/SluggableListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ private function generateSlug(SluggableAdapter $ea, $object)
347347
$slug = preg_replace_callback('/^[a-z]|'.$quotedSeparator.'[a-z]/smi', static function ($m) {
348348
return strtoupper($m[0]);
349349
}, $slug);
350+
350351
break;
351352

352353
case 'lower':
@@ -355,6 +356,7 @@ private function generateSlug(SluggableAdapter $ea, $object)
355356
} else {
356357
$slug = strtolower($slug);
357358
}
359+
358360
break;
359361

360362
case 'upper':
@@ -363,6 +365,7 @@ private function generateSlug(SluggableAdapter $ea, $object)
363365
} else {
364366
$slug = strtoupper($slug);
365367
}
368+
366369
break;
367370

368371
default:

src/SoftDeleteable/Query/TreeWalker/SoftDeleteableWalker.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ private function getSoftDeleteableListener()
9393
foreach ($listeners as $hash => $listener) {
9494
if ($listener instanceof SoftDeleteableListener) {
9595
$this->listener = $listener;
96+
9697
break;
9798
}
9899
}

src/Sortable/Entity/Repository/SortableRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function __construct(EntityManagerInterface $em, ClassMetadata $class)
3333
foreach ($listeners as $hash => $listener) {
3434
if ($listener instanceof SortableListener) {
3535
$sortableListener = $listener;
36+
3637
break;
3738
}
3839
}

0 commit comments

Comments
 (0)