Passed
Branch master (95796a)
by Andreas
38:22
created
src/midcom/datamanager/extension/formextension.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function configureOptions(OptionsResolver $resolver)
22 22
     {
23
-        $resolver->setDefaults(array
24
-        (
23
+        $resolver->setDefaults(array(
25 24
             'widget_config' => array(),
26 25
             'type_config' => array(),
27 26
             'dm2_type' => null,
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
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
             }
35 35
         }
36 36
 
37
-        if (   $input === null
38
-            || (   $input instanceof DateTime
37
+        if ($input === null
38
+            || ($input instanceof DateTime
39 39
                 && $input->format('Y-m-d H:i:s') == '0001-01-01 00:00:00'))
40 40
         {
41 41
             return $result;
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function reverseTransform($array)
63 63
     {
64
-        if (!is_array($array) ) {
64
+        if (!is_array($array)) {
65 65
             throw new TransformationFailedException('Expected an array.');
66 66
         }
67 67
 
68 68
         if (empty($array['date'])
69
-            || (   $array['date'] instanceof DateTime
69
+            || ($array['date'] instanceof DateTime
70 70
                 && $array['date']->format('Y-m-d H:i:s') == '0001-01-01 00:00:00'))
71 71
         {
72 72
             return;
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/json.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     public function transform($array)
21 21
     {
22
-        if (!is_array($array) ) {
22
+        if (!is_array($array)) {
23 23
             throw new TransformationFailedException('Expected an array.');
24 24
         }
25 25
 
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/blobs.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
         {
51 51
             $description = $attachment->get_parameter('midcom.helper.datamanager2.type.blobs', 'description');
52 52
         }
53
-        return array
54
-        (
53
+        return array(
55 54
             'filename' => $attachment->name,
56 55
             'description' => $description,
57 56
             'title' => $attachment->title,
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
         $title = (!empty($data['title'])) ? $data['title'] : $data['file']['name'];
82 81
         $description = (array_key_exists('description', $data)) ? $data['description'] : $title;
83 82
         $stat = stat($data['file']['tmp_name']);
84
-        return array
85
-        (
83
+        return array(
86 84
             'filename' => $data['file']['name'],
87 85
             'description' => $description,
88 86
             'title' => $title,
@@ -104,7 +102,7 @@  discard block
 block discarded – undo
104 102
 
105 103
     public function reverseTransform($array)
106 104
     {
107
-        if (!is_array($array) ) {
105
+        if (!is_array($array)) {
108 106
             throw new TransformationFailedException('Expected an array.');
109 107
         }
110 108
 
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
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function transform($input)
23 23
     {
24
-        if (   $this->config['dm2_type'] == 'select'
24
+        if ($this->config['dm2_type'] == 'select'
25 25
             && $this->config['type_config']['allow_multiple'])
26 26
         {
27 27
             switch ($this->config['type_config']['multiple_storagemode'])
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function reverseTransform($array)
45 45
     {
46
-        if (!is_array($array) ) {
46
+        if (!is_array($array)) {
47 47
             throw new TransformationFailedException('Expected an array.');
48 48
         }
49 49
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             return reset($array['selection']);
58 58
         }
59 59
 
60
-        if (   $this->config['dm2_type'] == 'select'
60
+        if ($this->config['dm2_type'] == 'select'
61 61
             && $this->config['type_config']['allow_multiple'])
62 62
         {
63 63
             switch ($this->config['type_config']['multiple_storagemode'])
Please login to merge, or discard this patch.
src/midcom/datamanager/schema.php 1 patch
Spacing   +7 added lines, -11 removed lines patch added patch discarded remove patch
@@ -18,8 +18,7 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class schema
20 20
 {
21
-    private $defaults = array
22
-    (
21
+    private $defaults = array(
23 22
         'operations' => array('save' => '', 'cancel' => '')
24 23
     );
25 24
 
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
     {
65 64
         foreach ($this->config['fields'] as $name => $config)
66 65
         {
67
-            $options = array
68
-            (
66
+            $options = array(
69 67
                 'label' => $config['title'],
70 68
                 'widget_config' => $config['widget_config'],
71 69
                 'type_config' => $config['type_config'],
@@ -138,8 +136,7 @@  discard block
 block discarded – undo
138 136
     {
139 137
         $resolver = new OptionsResolver();
140 138
 
141
-        $resolver->setDefaults(array
142
-        (
139
+        $resolver->setDefaults(array(
143 140
             'title' => '',
144 141
             'type' => null,
145 142
             'type_config' => array(),
@@ -154,9 +151,9 @@  discard block
 block discarded – undo
154 151
             'end_fieldset' => null
155 152
         ));
156 153
 
157
-        $normalize_widget = function (Options $options, $value) use ($name)
154
+        $normalize_widget = function(Options $options, $value) use ($name)
158 155
         {
159
-            if (   $value == 'images'
156
+            if ($value == 'images'
160 157
                 || $value == 'downloads')
161 158
             {
162 159
                 return 'subform';
@@ -164,10 +161,9 @@  discard block
 block discarded – undo
164 161
             return $value;
165 162
         };
166 163
 
167
-        $normalize_storage = function (Options $options, $value) use ($name)
164
+        $normalize_storage = function(Options $options, $value) use ($name)
168 165
         {
169
-            $default = array
170
-            (
166
+            $default = array(
171 167
                 'location' => 'parameter',
172 168
                 'domain' => 'midcom.helper.datamanager2',
173 169
                 'name' => $name
Please login to merge, or discard this patch.
src/midcom/datamanager/controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         if ($this->form->isSubmitted())
59 59
         {
60 60
             $button = $this->form->getClickedButton();
61
-            if (   $button
61
+            if ($button
62 62
                 && $button->getConfig()->getOption('operation') == self::CANCEL)
63 63
             {
64 64
                 return self::CANCEL;
Please login to merge, or discard this patch.
src/midcom/datamanager/validation/photoValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function validate($value, Constraint $constraint)
14 14
     {
15
-        if (   empty($value['archival'])
15
+        if (empty($value['archival'])
16 16
             && empty($value['file']))
17 17
         {
18 18
             $this->context->buildViolation($constraint->message)
Please login to merge, or discard this patch.
src/midcom/datamanager/storage/blobs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
 
121 121
         if (!empty($this->config['widget_config']['sortable']))
122 122
         {
123
-            uasort($this->map, function ($a, $b)
123
+            uasort($this->map, function($a, $b)
124 124
             {
125 125
                 if ($a->metadata->score == $b->metadata->score)
126 126
                 {
Please login to merge, or discard this patch.