Completed
Branch master (5ba041)
by Alexey
06:59 queued 30s
created
src/ZfPhinx/Service/ZfPhinxServiceFactory.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,8 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $config = $container->get('Config');
48 48
 
49
-        if (!(array_key_exists('zfphinx', $config) && is_array($config['zfphinx']))) {
49
+        if (!(array_key_exists('zfphinx', $config) && is_array($config['zfphinx'])))
50
+        {
50 51
             throw new Exception\RuntimeException('zfphinx config is not found');
51 52
         }
52 53
 
@@ -62,15 +63,19 @@  discard block
 block discarded – undo
62 63
      */
63 64
     private function performConfig(ContainerInterface $container, array $config)
64 65
     {
65
-        if (!(array_key_exists('environments', $config) && is_array($config['environments']))) {
66
+        if (!(array_key_exists('environments', $config) && is_array($config['environments'])))
67
+        {
66 68
             throw new Exception\RuntimeException('zfphinx environment config is not found');
67 69
         }
68 70
 
69 71
         array_walk(
70 72
             $config['environments'],
71
-            function (&$element, $key) use ($container) {
72
-                if (is_array($element) && array_key_exists('db_adapter', $element)) {
73
-                    if (!$container->has($element['db_adapter'])) {
73
+            function (&$element, $key) use ($container)
74
+            {
75
+                if (is_array($element) && array_key_exists('db_adapter', $element))
76
+                {
77
+                    if (!$container->has($element['db_adapter']))
78
+                    {
74 79
                         $message = sprintf(
75 80
                             'Adapter for environment %s is not found',
76 81
                             $key
@@ -80,7 +85,8 @@  discard block
 block discarded – undo
80 85
 
81 86
                     $adapter = $container->get($element['db_adapter']);
82 87
 
83
-                    if (!$adapter instanceof AdapterInterface) {
88
+                    if (!$adapter instanceof AdapterInterface)
89
+                    {
84 90
                         $message = sprintf(
85 91
                             'Adapter for environment %s must implement %s; %s given',
86 92
                             $key,
Please login to merge, or discard this patch.
src/ZfPhinx/Command/Test.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,10 @@
 block discarded – undo
28 28
         $this->verifyMigrationDirectory($this->getConfig()->getMigrationPath());
29 29
 
30 30
         $envName = $input->getOption('environment');
31
-        if ($envName) {
32
-            if (!$this->getConfig()->hasEnvironment($envName)) {
31
+        if ($envName)
32
+        {
33
+            if (!$this->getConfig()->hasEnvironment($envName))
34
+            {
33 35
                 throw new \InvalidArgumentException(sprintf(
34 36
                     'The environment "%s" does not exist',
35 37
                     $envName
Please login to merge, or discard this patch.