@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | // @TODO: Add existing bundle validation |
| 51 | 51 | $question->setValidator(['Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateBundleName']); |
| 52 | - $question->setNormalizer(function ($value) { |
|
| 52 | + $question->setNormalizer(function($value) { |
|
| 53 | 53 | return $value ? trim($value) : ''; |
| 54 | 54 | }); |
| 55 | 55 | $question->setMaxAttempts(2); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | // @TODO: Add existing bundle validation |
| 63 | 63 | $question->setValidator(['Sensio\Bundle\GeneratorBundle\Command\Validators', 'validateBundleName']); |
| 64 | 64 | $question->setNormalizer( |
| 65 | - function ($value) { |
|
| 65 | + function($value) { |
|
| 66 | 66 | return $value ? trim($value) : ''; |
| 67 | 67 | } |
| 68 | 68 | ); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $input->getOption('notification_name') |
| 86 | 86 | ); |
| 87 | 87 | $question->setValidator( |
| 88 | - function ($answer) { |
|
| 88 | + function($answer) { |
|
| 89 | 89 | // Should only contain letters. |
| 90 | 90 | $valid = preg_match('/^[a-zA-Z]+$/', $answer); |
| 91 | 91 | if (!$valid) { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | ); |
| 100 | 100 | $question->setNormalizer( |
| 101 | - function ($value) { |
|
| 101 | + function($value) { |
|
| 102 | 102 | return $value ? trim($value) : ''; |
| 103 | 103 | } |
| 104 | 104 | ); |
@@ -164,13 +164,13 @@ discard block |
||
| 164 | 164 | ), 'yes' |
| 165 | 165 | ); |
| 166 | 166 | $question->setNormalizer( |
| 167 | - function ($value) { |
|
| 167 | + function($value) { |
|
| 168 | 168 | return $value[0] == 'y' ? 'y' : 'n'; |
| 169 | 169 | } |
| 170 | 170 | ); |
| 171 | 171 | |
| 172 | 172 | $question->setValidator( |
| 173 | - function ($answer) { |
|
| 173 | + function($answer) { |
|
| 174 | 174 | // Should only contain letters. |
| 175 | 175 | $allowed = [ |
| 176 | 176 | 'y', |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $command |
| 34 | 34 | ->setDescription('Creates a new doctrine entity class for use as a database notification') |
| 35 | 35 | // ->addArgument('name', InputArgument::OPTIONAL, 'The name of the notification class (e.g. <fg=yellow>NewUserNotification</>)') |
| 36 | - ->setHelp(file_get_contents(__DIR__.'/../Resources/help/MakeDatabaseNotification.txt')) |
|
| 36 | + ->setHelp(file_get_contents(__DIR__ . '/../Resources/help/MakeDatabaseNotification.txt')) |
|
| 37 | 37 | ; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $generator->generateClass( |
| 49 | 49 | $voterClassNameDetails->getFullName(), |
| 50 | - __DIR__.'/../Resources/skeleton/notification/DatabaseNotification.tpl.php', |
|
| 50 | + __DIR__ . '/../Resources/skeleton/notification/DatabaseNotification.tpl.php', |
|
| 51 | 51 | [] |
| 52 | 52 | ); |
| 53 | 53 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $command |
| 35 | 35 | ->setDescription('Creates a new notification class') |
| 36 | 36 | ->addArgument('name', InputArgument::OPTIONAL, 'The name of the notification class (e.g. <fg=yellow>NewUserNotification</>)') |
| 37 | - ->setHelp(file_get_contents(__DIR__.'/../Resources/help/MakeNotification.txt')) |
|
| 37 | + ->setHelp(file_get_contents(__DIR__ . '/../Resources/help/MakeNotification.txt')) |
|
| 38 | 38 | ; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | $generator->generateClass( |
| 59 | 59 | $voterClassNameDetails->getFullName(), |
| 60 | - __DIR__.'/../Resources/skeleton/notification/Notification.tpl.php', |
|
| 60 | + __DIR__ . '/../Resources/skeleton/notification/Notification.tpl.php', |
|
| 61 | 61 | [] |
| 62 | 62 | ); |
| 63 | 63 | |
@@ -11,6 +11,6 @@ |
||
| 11 | 11 | { |
| 12 | 12 | public function build(ContainerBuilder $container) |
| 13 | 13 | { |
| 14 | - $container->addCompilerPass(new AdapterPass(),PassConfig::TYPE_BEFORE_OPTIMIZATION, 10); |
|
| 14 | + $container->addCompilerPass(new AdapterPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10); |
|
| 15 | 15 | } |
| 16 | 16 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | // get the adapter name from the |
| 69 | 69 | // $adapterKey = $message->getChannel(); |
| 70 | 70 | $adapterKey = $this->channelConfigMap[$notification->getChannel()]['adapter']; |
| 71 | - $channelConfiguration = $this->channelConfigMap[$notification->getChannel()]['config']; |
|
| 71 | + $channelConfiguration = $this->channelConfigMap[$notification->getChannel()]['config']; |
|
| 72 | 72 | |
| 73 | 73 | // Get the adapter for this channel |
| 74 | 74 | // and inject it into the adapterless channel |