Skip to content

Commit 2ba571b

Browse files
Formatting
1 parent 56d80a5 commit 2ba571b

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

src/Vivait/StringGeneratorBundle/EventListener/GeneratorListener.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,25 +133,26 @@ public function configureGenerator(ConfigurableGeneratorInterface $generator, $o
133133
}
134134

135135
/**
136-
* @param GeneratorInterface $generator
136+
* @param GeneratorInterface $generator
137137
* @param GeneratorAnnotation $annotation
138-
* @param \ReflectionObject $object
138+
* @param \ReflectionObject $object
139139
*/
140140
public function performCallbacks(GeneratorInterface $generator, GeneratorAnnotation $annotation, $object)
141141
{
142142
foreach($annotation->callbacks as $callback => $value){
143-
if($this->isMethod($generator, $callback)){
144-
145-
if($this->isMethod($object, $value)){
143+
if($this->isMethod($generator, $callback)) {
144+
if($this->isMethod($object, $value)) {
146145
$value = $object->$value();
147146
}
147+
148148
$generator->$callback($value);
149-
}
150-
else{
151-
throw new \InvalidArgumentException(sprintf(
152-
'Callback "%s" does not exist in class "%s"',
153-
$callback,
154-
get_class($generator))
149+
} else {
150+
throw new \InvalidArgumentException(
151+
sprintf(
152+
'Callback "%s" does not exist in class "%s"',
153+
$callback,
154+
get_class($generator)
155+
)
155156
);
156157
}
157158
}

0 commit comments

Comments
 (0)