Test Setup Failed
Pull Request — master (#190)
by
unknown
17:12
created
lib/org/openpsa/user/handler/person/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
         $this->_person = new midcom_db_person;
104 104
         if (!$this->_person->create()) {
105 105
             debug_print_r('We operated on this object:', $this->_person);
106
-            throw new midcom_error('Failed to create a new person. Last Midgard error was: '. midcom_connection::get_error_string());
106
+            throw new midcom_error('Failed to create a new person. Last Midgard error was: ' . midcom_connection::get_error_string());
107 107
         }
108 108
 
109 109
         return $this->_person;
Please login to merge, or discard this patch.
src/midcom/events/watcher.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,8 @@
 block discarded – undo
48 48
 
49 49
         try {
50 50
             $interface = \midcom::get()->componentloader->get_interface_class($this->component);
51
-        } catch (\midcom_error $e) {
51
+        }
52
+        catch (\midcom_error $e) {
52 53
             debug_add("Failed to load the component {$this->component}: " . $e->getMessage(), MIDCOM_LOG_INFO);
53 54
             return;
54 55
         }
Please login to merge, or discard this patch.
src/midcom/workflow/dialog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         $button_config[MIDCOM_TOOLBAR_URL] = $url;
74 74
         //The constants are numeric, so array_merge won't work...
75 75
         foreach ($options as $key => $value) {
76
-            if (   is_array($value)
76
+            if (is_array($value)
77 77
                 && !empty($button_config[$key])) {
78 78
                 $value = array_merge($button_config[$key], $value);
79 79
             }
Please login to merge, or discard this patch.
src/midcom/datamanager/storage/container/dbacontainer.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@
 block discarded – undo
65 65
     private function prepare_field(array $config)
66 66
     {
67 67
         if (   empty($config['storage']['location'])
68
-               // This line is needed because a parameter default is set by the schema parser and then ignored
69
-               // by the type. The things we do for backwards compatibility...
68
+                // This line is needed because a parameter default is set by the schema parser and then ignored
69
+                // by the type. The things we do for backwards compatibility...
70 70
             || $config['storage']['location'] === 'parameter') {
71 71
             if (class_exists('midcom\datamanager\storage\\' . $config['type'])) {
72 72
                 $classname = 'midcom\datamanager\storage\\' . $config['type'];
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             }
33 33
             $config['name'] = $name;
34 34
             $field = $this->prepare_field($config);
35
-            if (   isset($config['default'])
35
+            if (isset($config['default'])
36 36
                 && !$this->object->id) {
37 37
                 $field->set_value($config['default']);
38 38
             }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     private function prepare_field(array $config)
66 66
     {
67
-        if (   empty($config['storage']['location'])
67
+        if (empty($config['storage']['location'])
68 68
                // This line is needed because a parameter default is set by the schema parser and then ignored
69 69
                // by the type. The things we do for backwards compatibility...
70 70
             || $config['storage']['location'] === 'parameter') {
Please login to merge, or discard this patch.
src/midcom/datamanager/template/view.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $string = '';
26 26
         foreach ($view as $child) {
27
-            if (    array_key_exists('start_fieldset', $child->vars)
27
+            if (array_key_exists('start_fieldset', $child->vars)
28 28
                 && $child->vars['start_fieldset'] !== null) {
29 29
                 $string .= '<div class="fieldset">';
30 30
                 if (!empty($child->vars['start_fieldset']['title'])) {
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                 }
33 33
             }
34 34
             $string .= $this->renderer->row($child);
35
-            if (    array_key_exists('end_fieldset', $child->vars)
35
+            if (array_key_exists('end_fieldset', $child->vars)
36 36
                 && $child->vars['end_fieldset'] !== null) {
37 37
                 $end_fieldsets = max(1, (int) $child->vars['end_fieldset']);
38 38
                 for ($i = 0; $i < $end_fieldsets; $i++) {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
     public function form_widget_simple(FormView $view, array $data)
86 86
     {
87
-        if (   !empty($data['value'])
87
+        if (!empty($data['value'])
88 88
             || is_numeric($data['value'])) {
89 89
             return $this->escape($data['value']);
90 90
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $string = $this->renderer->widget($view['date']);
132 132
 
133 133
         if (isset($view['time'])) {
134
-            $string .= ' '. $this->renderer->widget($view['time']);
134
+            $string .= ' ' . $this->renderer->widget($view['time']);
135 135
         }
136 136
         return $string;
137 137
     }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/blobs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
     public function reverseTransform($array)
100 100
     {
101
-        if (!is_array($array) ) {
101
+        if (!is_array($array)) {
102 102
             throw new TransformationFailedException('Expected an array.');
103 103
         }
104 104
 
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/jsdate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
             }
34 34
         }
35 35
 
36
-        if (   $input === null
37
-            || (   $input instanceof DateTime
36
+        if ($input === null
37
+            || ($input instanceof DateTime
38 38
                 && $input->format('Y-m-d H:i:s') == '0001-01-01 00:00:00')) {
39 39
             return $result;
40 40
         }
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function reverseTransform($array)
57 57
     {
58
-        if (!is_array($array) ) {
58
+        if (!is_array($array)) {
59 59
             throw new TransformationFailedException('Expected an array.');
60 60
         }
61 61
 
62 62
         if (empty($array['date'])
63
-            || (   $array['date'] instanceof DateTime
63
+            || ($array['date'] instanceof DateTime
64 64
                 && $array['date']->format('Y-m-d H:i:s') == '0001-01-01 00:00:00')) {
65 65
             return;
66 66
         }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/autocomplete.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function transform($input)
24 24
     {
25
-        if (   $this->config['dm2_type'] == 'select'
25
+        if ($this->config['dm2_type'] == 'select'
26 26
             && $this->config['type_config']['allow_multiple']) {
27 27
             switch ($this->config['type_config']['multiple_storagemode']) {
28 28
                 case 'serialized':
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function reverseTransform($array)
44 44
     {
45
-        if (!is_array($array) ) {
45
+        if (!is_array($array)) {
46 46
             throw new TransformationFailedException('Expected an array.');
47 47
         }
48 48
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             return reset($array['selection']);
55 55
         }
56 56
 
57
-        if (   $this->config['dm2_type'] == 'select'
57
+        if ($this->config['dm2_type'] == 'select'
58 58
             && $this->config['type_config']['allow_multiple']) {
59 59
             switch ($this->config['type_config']['multiple_storagemode']) {
60 60
                 case 'serialized':
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/type/autocomplete.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,8 @@
 block discarded – undo
106 106
                 try {
107 107
                     $object = new $options['widget_config']['class']($identifier);
108 108
                     $preset[$identifier] = \midcom_helper_datamanager2_widget_autocomplete::create_item_label($object, $options['widget_config']['result_headers'], $options['widget_config']['get_label_for']);
109
-                } catch (midcom_error $e) {
109
+                }
110
+                catch (midcom_error $e) {
110 111
                     $e->log();
111 112
                 }
112 113
             }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function configureOptions(OptionsResolver $resolver)
31 31
     {
32
-        $resolver->setNormalizer('widget_config', function (Options $options, $value) {
32
+        $resolver->setNormalizer('widget_config', function(Options $options, $value) {
33 33
             $widget_defaults = array(
34 34
                 'creation_mode_enabled' => false,
35 35
                 'class' => null,
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
             return helper::resolve_options($widget_defaults, $value);
63 63
         });
64
-        $resolver->setNormalizer('type_config', function (Options $options, $value) {
64
+        $resolver->setNormalizer('type_config', function(Options $options, $value) {
65 65
             $type_defaults = array(
66 66
                 'options' => array(),
67 67
                 'allow_other' => false,
Please login to merge, or discard this patch.