Failed Conditions
Pull Request — master (#1754)
by Takahiro
11:41
created
src/PhpSpreadsheet/Worksheet/BaseDrawing.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,8 +137,7 @@
 block discarded – undo
137 137
         $this->rotation = 0;
138 138
         $this->shadow = new Drawing\Shadow();
139 139
 
140
-        // Set image index
141
-        ++self::$imageCounter;
140
+        // Set image index++self::$imageCounter;
142 141
         $this->imageIndex = self::$imageCounter;
143 142
     }
144 143
 
Please login to merge, or discard this patch.
tests/data/Calculation/Calculation.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
     $set6 = [0, $dataArray3, '=IF(A1+B1>3,C1,0)', 'E5'];
36 36
 
37 37
     $dataArray4 = [
38
-        ['noflag',    0, 0],
39
-        [127000,    0, 0],
40
-        [10000,  0.03, 0],
41
-        [20000,  0.06, 0],
42
-        [40000,  0.09, 0],
43
-        [70000,  0.12, 0],
44
-        [90000,  0.03, 0],
38
+        ['noflag', 0, 0],
39
+        [127000, 0, 0],
40
+        [10000, 0.03, 0],
41
+        [20000, 0.06, 0],
42
+        [40000, 0.09, 0],
43
+        [70000, 0.12, 0],
44
+        [90000, 0.03, 0],
45 45
     ];
46 46
     $formula2 = '=IF(A1="flag",IF(A2<10, 0) + IF(A3<10000, 0))';
47 47
     $set7 = [false, $dataArray4, $formula2, 'E5'];
Please login to merge, or discard this patch.
tests/data/Calculation/MathTrig/MINVERSE.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 return [
4 4
     [
5 5
         [
6
-            [0.147222222222222,    -0.14444444444444399,   0.063888888888888898],
7
-            [-0.061111111111111102,  0.022222222222222199,  0.105555555555556],
8
-            [-0.0194444444444444,    0.18888888888888899,  -0.102777777777778],
6
+            [0.147222222222222, -0.14444444444444399, 0.063888888888888898],
7
+            [-0.061111111111111102, 0.022222222222222199, 0.105555555555556],
8
+            [-0.0194444444444444, 0.18888888888888899, -0.102777777777778],
9 9
         ],
10 10
         [
11 11
             [8, 1, 6],
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     [
17 17
         [
18 18
             [4, -1],
19
-            [2,  0],
19
+            [2, 0],
20 20
         ],
21 21
         [
22 22
             [0.0, 0.5],
@@ -25,28 +25,28 @@  discard block
 block discarded – undo
25 25
     ],
26 26
     [
27 27
         [
28
-            [1, 2,  1],
28
+            [1, 2, 1],
29 29
             [3, 4, -1],
30
-            [0, 2,  0],
30
+            [0, 2, 0],
31 31
         ],
32 32
         [
33
-            [0.25,  0.25, -0.75],
34
-            [0.00,  0.00,  0.50],
33
+            [0.25, 0.25, -0.75],
34
+            [0.00, 0.00, 0.50],
35 35
             [0.75, -0.25, -0.25],
36 36
         ],
37 37
     ],
38 38
     [
39 39
         [
40
-            [-0.4545454545455, 1.8181818181818,  0.2727272727273, -0.4545454545455],
40
+            [-0.4545454545455, 1.8181818181818, 0.2727272727273, -0.4545454545455],
41 41
             [-0.4545454545455, 1.8181818181818, -0.7272727272727, -0.4545454545455],
42
-            [0.9090909090909, 1.3636363636364,  0.4545454545455,  0.9090909090909],
43
-            [2.2727272727273, 0.9090909090909,  5.6363636363636,  3.2727272727273],
42
+            [0.9090909090909, 1.3636363636364, 0.4545454545455, 0.9090909090909],
43
+            [2.2727272727273, 0.9090909090909, 5.6363636363636, 3.2727272727273],
44 44
         ],
45 45
         [
46
-            [3.2, -4.8,  2.8, -1.0],
47
-            [0.2,  0.2,  0.2,  0.0],
48
-            [1.0, -1.0,  0.0,  0.0],
49
-            [-4.0,  5.0, -2.0,  1.0],
46
+            [3.2, -4.8, 2.8, -1.0],
47
+            [0.2, 0.2, 0.2, 0.0],
48
+            [1.0, -1.0, 0.0, 0.0],
49
+            [-4.0, 5.0, -2.0, 1.0],
50 50
         ],
51 51
     ],
52 52
     [
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             [3, 4],
56 56
         ],
57 57
         [
58
-            [-2.0,  1.0],
58
+            [-2.0, 1.0],
59 59
             [1.5, -0.5],
60 60
         ],
61 61
     ],
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
         ],
68 68
         [
69 69
             [-2, 1, 0],
70
-            [1.3333333333333299,  -0.33333333333332998, -0.33333333333332998],
71
-            [0.33333333333332998, -0.33333333333332998,  0.66666666666666996],
70
+            [1.3333333333333299, -0.33333333333332998, -0.33333333333332998],
71
+            [0.33333333333332998, -0.33333333333332998, 0.66666666666666996],
72 72
         ],
73 73
     ],
74 74
     [
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             [4, 5],
78 78
         ],
79 79
         [
80
-            [-2.5,  1.5],
80
+            [-2.5, 1.5],
81 81
             [2.0, -1.0],
82 82
         ],
83 83
     ],
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             [7, 9],
88 88
         ],
89 89
         [
90
-            [-0.81818181818181801,  0.72727272727272696],
90
+            [-0.81818181818181801, 0.72727272727272696],
91 91
             [0.63636363636363602, -0.45454545454545497],
92 92
         ],
93 93
     ],
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         ],
99 99
         [
100 100
             [0.054112554112554001, -0.084415584415584],
101
-            [-0.018398268398268001,  0.048701298701299002],
101
+            [-0.018398268398268001, 0.048701298701299002],
102 102
         ],
103 103
     ],
104 104
     [
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             [2, 1],
108 108
         ],
109 109
         [
110
-            [-0.5,  1.0],
110
+            [-0.5, 1.0],
111 111
             [1.0, -1.0],
112 112
         ],
113 113
     ],
Please login to merge, or discard this patch.
tests/data/Calculation/MathTrig/MDETERM.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     [
52 52
         1.81,
53 53
         [
54
-            [0.20,  1.0],
54
+            [0.20, 1.0],
55 55
             [0.35, 10.8],
56 56
         ],
57 57
     ],
@@ -73,17 +73,17 @@  discard block
 block discarded – undo
73 73
     [
74 74
         88,
75 75
         [
76
-            [1, 3,  8, 5],
77
-            [1, 3,  6, 1],
78
-            [1, 1,  1, 0],
76
+            [1, 3, 8, 5],
77
+            [1, 3, 6, 1],
78
+            [1, 1, 1, 0],
79 79
             [7, 3, 10, 2],
80 80
         ],
81 81
     ],
82 82
     [
83 83
         1,
84 84
         [
85
-            [3,  6, 1],
86
-            [1,  1, 0],
85
+            [3, 6, 1],
86
+            [1, 1, 0],
87 87
             [3, 10, 2],
88 88
         ],
89 89
     ],
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
     [
98 98
         '#VALUE!',
99 99
         [
100
-            [0.20,  1.00, -0.90],
101
-            [0.35, 10.80,  4.00],
102
-            [-3.15,  5.00,  null],
100
+            [0.20, 1.00, -0.90],
101
+            [0.35, 10.80, 4.00],
102
+            [-3.15, 5.00, null],
103 103
         ],
104 104
     ],
105 105
     [
Please login to merge, or discard this patch.
tests/data/Calculation/MathTrig/MMULT.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
     ],
18 18
     [
19 19
         [
20
-            [30,  36,  42],
21
-            [66,  81,  96],
20
+            [30, 36, 42],
21
+            [66, 81, 96],
22 22
             [102, 126, 150],
23 23
         ],
24 24
         [
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     ],
63 63
     [
64 64
         [
65
-            [62.00,  49.46],
65
+            [62.00, 49.46],
66 66
             [176.40, 144.50],
67 67
         ],
68 68
         [
Please login to merge, or discard this patch.
tests/data/Calculation/LookupRef/LOOKUP.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 return [
4 4
 
5
-    [ // Office reference example #1
5
+    [// Office reference example #1
6 6
         'orange',
7 7
         4.19,
8 8
         [
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
             ['blue'],
21 21
         ],
22 22
     ],
23
-    [ // Office reference example #2
23
+    [// Office reference example #2
24 24
         'yellow',
25 25
         5.75,
26 26
         [
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             ['blue'],
39 39
         ],
40 40
     ],
41
-    [ // Office reference example #3
41
+    [// Office reference example #3
42 42
         'blue',
43 43
         7.66,
44 44
         [
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             ['blue'],
57 57
         ],
58 58
     ],
59
-    [ // Office reference example #4
59
+    [// Office reference example #4
60 60
         '#N/A',
61 61
         0,
62 62
         [
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         ],
76 76
     ],
77 77
 
78
-    [ // Array form test
78
+    [// Array form test
79 79
         'orange',
80 80
         4.2,
81 81
         [
Please login to merge, or discard this patch.
Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             foreach ((count($extLstXml) > 0 ? $extLstXml : [$extLstXml]) as $extLst) {
61 61
                 //this uri is conditionalFormattings
62 62
                 //https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/07d607af-5618-4ca2-b683-6a78dc0d9627
63
-                if (isset($extLst->ext['uri']) && (string)$extLst->ext['uri'] === '{78C0D931-6437-407d-A8EE-F0AAD7539E65}') {
63
+                if (isset($extLst->ext['uri']) && (string) $extLst->ext['uri'] === '{78C0D931-6437-407d-A8EE-F0AAD7539E65}') {
64 64
                     $conditionalFormattingRuleExtensionXml = $extLst->ext;
65 65
                 }
66 66
             }
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
 
71 71
                 foreach ($extFormattingsXml->children($ns['x14']) as $extFormattingXml) {
72 72
                     $extCfRuleXml = $extFormattingXml->cfRule;
73
-                    $extFormattingRuleObj = new self((string)$extCfRuleXml->attributes()->id);
74
-                    $extFormattingRuleObj->setSqref((string)$extFormattingXml->children($ns['xm'])->sqref);
73
+                    $extFormattingRuleObj = new self((string) $extCfRuleXml->attributes()->id);
74
+                    $extFormattingRuleObj->setSqref((string) $extFormattingXml->children($ns['xm'])->sqref);
75 75
                     $conditionalFormattingRuleExtensions[$extFormattingRuleObj->getId()] = $extFormattingRuleObj;
76 76
 
77 77
                     $extDataBarObj = new ConditionalDataBarExtension();
@@ -91,51 +91,51 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $dataBarAttribute = $dataBarXml->attributes();
93 93
         if ($dataBarAttribute->minLength) {
94
-            $extDataBarObj->setMinLength((int)$dataBarAttribute->minLength);
94
+            $extDataBarObj->setMinLength((int) $dataBarAttribute->minLength);
95 95
         }
96 96
         if ($dataBarAttribute->maxLength) {
97
-            $extDataBarObj->setMaxLength((int)$dataBarAttribute->maxLength);
97
+            $extDataBarObj->setMaxLength((int) $dataBarAttribute->maxLength);
98 98
         }
99 99
         if ($dataBarAttribute->border) {
100
-            $extDataBarObj->setBorder((bool)(string)$dataBarAttribute->border);
100
+            $extDataBarObj->setBorder((bool) (string) $dataBarAttribute->border);
101 101
         }
102 102
         if ($dataBarAttribute->gradient) {
103
-            $extDataBarObj->setGradient((bool)(string)$dataBarAttribute->gradient);
103
+            $extDataBarObj->setGradient((bool) (string) $dataBarAttribute->gradient);
104 104
         }
105 105
         if ($dataBarAttribute->direction) {
106
-            $extDataBarObj->setDirection((string)$dataBarAttribute->direction);
106
+            $extDataBarObj->setDirection((string) $dataBarAttribute->direction);
107 107
         }
108 108
         if ($dataBarAttribute->negativeBarBorderColorSameAsPositive) {
109
-            $extDataBarObj->setNegativeBarBorderColorSameAsPositive((bool)(string)$dataBarAttribute->negativeBarBorderColorSameAsPositive);
109
+            $extDataBarObj->setNegativeBarBorderColorSameAsPositive((bool) (string) $dataBarAttribute->negativeBarBorderColorSameAsPositive);
110 110
         }
111 111
         if ($dataBarAttribute->axisPosition) {
112
-            $extDataBarObj->setAxisPosition((string)$dataBarAttribute->axisPosition);
112
+            $extDataBarObj->setAxisPosition((string) $dataBarAttribute->axisPosition);
113 113
         }
114 114
     }
115 115
 
116 116
     private static function parseExtDataBarElementChildrenFromXml(ConditionalDataBarExtension $extDataBarObj, SimpleXMLElement $dataBarXml, $ns): void
117 117
     {
118 118
         if ($dataBarXml->borderColor) {
119
-            $extDataBarObj->setBorderColor((string)$dataBarXml->borderColor->attributes()['rgb']);
119
+            $extDataBarObj->setBorderColor((string) $dataBarXml->borderColor->attributes()['rgb']);
120 120
         }
121 121
         if ($dataBarXml->negativeFillColor) {
122
-            $extDataBarObj->setNegativeFillColor((string)$dataBarXml->negativeFillColor->attributes()['rgb']);
122
+            $extDataBarObj->setNegativeFillColor((string) $dataBarXml->negativeFillColor->attributes()['rgb']);
123 123
         }
124 124
         if ($dataBarXml->negativeBorderColor) {
125
-            $extDataBarObj->setNegativeBorderColor((string)$dataBarXml->negativeBorderColor->attributes()['rgb']);
125
+            $extDataBarObj->setNegativeBorderColor((string) $dataBarXml->negativeBorderColor->attributes()['rgb']);
126 126
         }
127 127
         if ($dataBarXml->axisColor) {
128 128
             $axisColorAttr = $dataBarXml->axisColor->attributes();
129
-            $extDataBarObj->setAxisColor((string)$axisColorAttr['rgb'], (string)$axisColorAttr['theme'], (string)$axisColorAttr['tint']);
129
+            $extDataBarObj->setAxisColor((string) $axisColorAttr['rgb'], (string) $axisColorAttr['theme'], (string) $axisColorAttr['tint']);
130 130
         }
131 131
         $cfvoIndex = 0;
132 132
         foreach ($dataBarXml->cfvo as $cfvo) {
133
-            $f = (string)$cfvo->children($ns['xm'])->f;
133
+            $f = (string) $cfvo->children($ns['xm'])->f;
134 134
             if ($cfvoIndex === 0) {
135
-                $extDataBarObj->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject((string)$cfvo->attributes()['type'], null, (empty($f) ? null : $f)));
135
+                $extDataBarObj->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject((string) $cfvo->attributes()['type'], null, (empty($f) ? null : $f)));
136 136
             }
137 137
             if ($cfvoIndex === 1) {
138
-                $extDataBarObj->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject((string)$cfvo->attributes()['type'], null, (empty($f) ? null : $f)));
138
+                $extDataBarObj->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject((string) $cfvo->attributes()['type'], null, (empty($f) ? null : $f)));
139 139
             }
140 140
             $cfvoIndex++;
141 141
         }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
         foreach ($xmlSheet->conditionalFormatting as $conditional) {
41 41
             foreach ($conditional->cfRule as $cfRule) {
42 42
                 if (
43
-                    ((string)$cfRule['type'] == Conditional::CONDITION_NONE
44
-                        || (string)$cfRule['type'] == Conditional::CONDITION_CELLIS
45
-                        || (string)$cfRule['type'] == Conditional::CONDITION_CONTAINSTEXT
46
-                        || (string)$cfRule['type'] == Conditional::CONDITION_CONTAINSBLANKS
47
-                        || (string)$cfRule['type'] == Conditional::CONDITION_NOTCONTAINSBLANKS
48
-                        || (string)$cfRule['type'] == Conditional::CONDITION_EXPRESSION)
49
-                    && isset($this->dxfs[(int)($cfRule['dxfId'])])
43
+                    ((string) $cfRule['type'] == Conditional::CONDITION_NONE
44
+                        || (string) $cfRule['type'] == Conditional::CONDITION_CELLIS
45
+                        || (string) $cfRule['type'] == Conditional::CONDITION_CONTAINSTEXT
46
+                        || (string) $cfRule['type'] == Conditional::CONDITION_CONTAINSBLANKS
47
+                        || (string) $cfRule['type'] == Conditional::CONDITION_NOTCONTAINSBLANKS
48
+                        || (string) $cfRule['type'] == Conditional::CONDITION_EXPRESSION)
49
+                    && isset($this->dxfs[(int) ($cfRule['dxfId'])])
50 50
                 ) {
51
-                    $conditionals[(string)$conditional['sqref']][(int)($cfRule['priority'])] = $cfRule;
52
-                } elseif ((string)$cfRule['type'] == Conditional::CONDITION_DATABAR) {
53
-                    $conditionals[(string)$conditional['sqref']][(int)($cfRule['priority'])] = $cfRule;
51
+                    $conditionals[(string) $conditional['sqref']][(int) ($cfRule['priority'])] = $cfRule;
52
+                } elseif ((string) $cfRule['type'] == Conditional::CONDITION_DATABAR) {
53
+                    $conditionals[(string) $conditional['sqref']][(int) ($cfRule['priority'])] = $cfRule;
54 54
                 }
55 55
             }
56 56
         }
@@ -78,29 +78,29 @@  discard block
 block discarded – undo
78 78
         $conditionalStyles = [];
79 79
         foreach ($cfRules as $cfRule) {
80 80
             $objConditional = new Conditional();
81
-            $objConditional->setConditionType((string)$cfRule['type']);
82
-            $objConditional->setOperatorType((string)$cfRule['operator']);
81
+            $objConditional->setConditionType((string) $cfRule['type']);
82
+            $objConditional->setOperatorType((string) $cfRule['operator']);
83 83
 
84
-            if ((string)$cfRule['text'] != '') {
85
-                $objConditional->setText((string)$cfRule['text']);
84
+            if ((string) $cfRule['text'] != '') {
85
+                $objConditional->setText((string) $cfRule['text']);
86 86
             }
87 87
 
88
-            if (isset($cfRule['stopIfTrue']) && (int)$cfRule['stopIfTrue'] === 1) {
88
+            if (isset($cfRule['stopIfTrue']) && (int) $cfRule['stopIfTrue'] === 1) {
89 89
                 $objConditional->setStopIfTrue(true);
90 90
             }
91 91
 
92 92
             if (count($cfRule->formula) > 1) {
93 93
                 foreach ($cfRule->formula as $formula) {
94
-                    $objConditional->addCondition((string)$formula);
94
+                    $objConditional->addCondition((string) $formula);
95 95
                 }
96 96
             } else {
97
-                $objConditional->addCondition((string)$cfRule->formula);
97
+                $objConditional->addCondition((string) $cfRule->formula);
98 98
             }
99 99
 
100 100
             if (isset($cfRule->dataBar)) {
101 101
                 $objConditional->setDataBar($this->readDataBarOfConditionalRule($cfRule, $conditionalFormattingRuleExtensions));
102 102
             } else {
103
-                $objConditional->setStyle(clone $this->dxfs[(int)($cfRule['dxfId'])]);
103
+                $objConditional->setStyle(clone $this->dxfs[(int) ($cfRule['dxfId'])]);
104 104
             }
105 105
 
106 106
             $conditionalStyles[] = $objConditional;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $dataBar = new ConditionalDataBar();
115 115
         //dataBar attribute
116 116
         if (isset($cfRule->dataBar['showValue'])) {
117
-            $dataBar->setShowValue((boolean)$cfRule->dataBar['showValue']);
117
+            $dataBar->setShowValue((boolean) $cfRule->dataBar['showValue']);
118 118
         }
119 119
 
120 120
         //dataBar children
@@ -123,24 +123,24 @@  discard block
 block discarded – undo
123 123
         $cfvoIndex = 0;
124 124
         foreach ((count($cfvoXml) > 1 ? $cfvoXml : [$cfvoXml]) as $cfvo) {
125 125
             if ($cfvoIndex === 0) {
126
-                $dataBar->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject((string)$cfvo['type'], (string)$cfvo['val']));
126
+                $dataBar->setMinimumConditionalFormatValueObject(new ConditionalFormatValueObject((string) $cfvo['type'], (string) $cfvo['val']));
127 127
             }
128 128
             if ($cfvoIndex === 1) {
129
-                $dataBar->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject((string)$cfvo['type'], (string)$cfvo['val']));
129
+                $dataBar->setMaximumConditionalFormatValueObject(new ConditionalFormatValueObject((string) $cfvo['type'], (string) $cfvo['val']));
130 130
             }
131 131
             $cfvoIndex++;
132 132
         }
133 133
 
134 134
         //color
135 135
         if (isset($cfRule->dataBar->color)) {
136
-            $dataBar->setColor((string)$cfRule->dataBar->color['rgb']);
136
+            $dataBar->setColor((string) $cfRule->dataBar->color['rgb']);
137 137
         }
138 138
         //extLst
139 139
         if (isset($cfRule->extLst)) {
140 140
             $ns = $cfRule->extLst->getNamespaces(true);
141 141
             foreach ((count($cfRule->extLst) > 0 ? $cfRule->extLst->ext : [$cfRule->extLst->ext]) as $ext) {
142
-                $extId = (string)$ext->children($ns['x14'])->id;
143
-                if (isset($conditionalFormattingRuleExtensions[$extId]) && (string)$ext['uri'] === '{B025F937-C7B1-47D3-B67F-A62EFF666E3E}') {
142
+                $extId = (string) $ext->children($ns['x14'])->id;
143
+                if (isset($conditionalFormattingRuleExtensions[$extId]) && (string) $ext['uri'] === '{B025F937-C7B1-47D3-B67F-A62EFF666E3E}') {
144 144
                     $dataBar->setConditionalFormattingRuleExt($conditionalFormattingRuleExtensions[$extId]);
145 145
                 }
146 146
             }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -323,8 +323,8 @@  discard block
 block discarded – undo
323 323
 
324 324
         // Set Zero Height row
325 325
         if (
326
-            (string)$pSheet->getDefaultRowDimension()->getZeroHeight() === '1' ||
327
-            strtolower((string)$pSheet->getDefaultRowDimension()->getZeroHeight()) == 'true'
326
+            (string) $pSheet->getDefaultRowDimension()->getZeroHeight() === '1' ||
327
+            strtolower((string) $pSheet->getDefaultRowDimension()->getZeroHeight()) == 'true'
328 328
         ) {
329 329
             $objWriter->writeAttribute('zeroHeight', '1');
330 330
         }
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
                 $outlineLevelRow = $dimension->getOutlineLevel();
342 342
             }
343 343
         }
344
-        $objWriter->writeAttribute('outlineLevelRow', (int)$outlineLevelRow);
344
+        $objWriter->writeAttribute('outlineLevelRow', (int) $outlineLevelRow);
345 345
 
346 346
         // Outline level - column
347 347
         $outlineLevelCol = 0;
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
                 $outlineLevelCol = $dimension->getOutlineLevel();
351 351
             }
352 352
         }
353
-        $objWriter->writeAttribute('outlineLevelCol', (int)$outlineLevelCol);
353
+        $objWriter->writeAttribute('outlineLevelCol', (int) $outlineLevelCol);
354 354
 
355 355
         $objWriter->endElement();
356 356
     }
@@ -567,15 +567,15 @@  discard block
 block discarded – undo
567 567
             $minCfvo = $dataBar->getMinimumConditionalFormatValueObject();
568 568
             if ($minCfvo) {
569 569
                 $objWriter->startElement('cfvo');
570
-                self::writeAttributeIf($objWriter, $minCfvo->getType(), 'type', (string)$minCfvo->getType());
571
-                self::writeAttributeIf($objWriter, $minCfvo->getValue(), 'val', (string)$minCfvo->getValue());
570
+                self::writeAttributeIf($objWriter, $minCfvo->getType(), 'type', (string) $minCfvo->getType());
571
+                self::writeAttributeIf($objWriter, $minCfvo->getValue(), 'val', (string) $minCfvo->getValue());
572 572
                 $objWriter->endElement();
573 573
             }
574 574
             $maxCfvo = $dataBar->getMaximumConditionalFormatValueObject();
575 575
             if ($maxCfvo) {
576 576
                 $objWriter->startElement('cfvo');
577
-                self::writeAttributeIf($objWriter, $maxCfvo->getType(), 'type', (string)$maxCfvo->getType());
578
-                self::writeAttributeIf($objWriter, $maxCfvo->getValue(), 'val', (string)$maxCfvo->getValue());
577
+                self::writeAttributeIf($objWriter, $maxCfvo->getType(), 'type', (string) $maxCfvo->getType());
578
+                self::writeAttributeIf($objWriter, $maxCfvo->getValue(), 'val', (string) $maxCfvo->getValue());
579 579
                 $objWriter->endElement();
580 580
             }
581 581
             if ($dataBar->getColor()) {
@@ -1197,7 +1197,7 @@  discard block
 block discarded – undo
1197 1197
         //force a decimal to be written if the type is float
1198 1198
         if (is_float($cellValue)) {
1199 1199
             // force point as decimal separator in case current locale uses comma
1200
-            $cellValue = str_replace(',', '.', (string)$cellValue);
1200
+            $cellValue = str_replace(',', '.', (string) $cellValue);
1201 1201
             if (strpos($cellValue, '.') === false) {
1202 1202
                 $cellValue = $cellValue . '.0';
1203 1203
             }
Please login to merge, or discard this patch.