Completed
Branch master (3d6c5c)
by Edgar
03:06
created
src/svg/gradient/UniformGradient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             }
32 32
         }
33 33
         $step = 1 / (count($colors) - 1);
34
-        $offsets = array_map(function ($item) {
34
+        $offsets = array_map(function($item) {
35 35
             return $item % 1 !== 0 ? sprintf('%0.2f', $item) : $item;
36 36
         }, range(0, 1, $step));
37 37
 
Please login to merge, or discard this patch.
src/svg/shape/Shape.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         ];
71 71
         foreach ($pointConfig as $key => $value) {
72 72
             if (isset($pointLightConfig[$key])) {
73
-                $pointConfig[$key] = $this->{$key} + $pointLightConfig[$key];
73
+                $pointConfig[$key] = $this->{$key} +$pointLightConfig[$key];
74 74
             }
75 75
         }
76 76
         $filter = DiffuseLighting::diffusePointLight($this->getRoot(), $pointConfig, $diffuseLightingConfig, $filterId);
Please login to merge, or discard this patch.
src/svg/traits/ElementTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     public function append(ElementInterface $elements)
21 21
     {
22 22
         /** @var ElementInterface[] $elements */
23
-        $elements = array_filter(func_get_args(), function ($item) {
23
+        $elements = array_filter(func_get_args(), function($item) {
24 24
             return $item instanceof ElementInterface;
25 25
         });
26 26
 
Please login to merge, or discard this patch.
example/componentTransfer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 $defs = new Defs($svg);
18 18
 
19 19
 $linearGradient = UniformGradient::uniformGradient($defs, ['#ff0000', '#00ff00', '#0000ff', '#000000'], null);
20
-KeyValueWriter::apply($linearGradient->getElement(), ['gradientUnits' => 'userSpaceOnUse', 'x1' => 100, 'y1' => 0, 'x2' => 600, 'y2' => 0,]);
20
+KeyValueWriter::apply($linearGradient->getElement(), ['gradientUnits' => 'userSpaceOnUse', 'x1' => 100, 'y1' => 0, 'x2' => 600, 'y2' => 0, ]);
21 21
 
22 22
 $g = new G($svg);
23 23
 $g->apply(['fontFamily' => 'Verdana', 'fontSize' => 75, 'fontWeight' => 'bold', 'fill' => "url(#$linearGradient->id)"]);
Please login to merge, or discard this patch.
example/gradient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 require_once __DIR__ . '/../vendor/autoload.php';
10 10
 
11
-$style = ['stroke' => 'lightgray', 'stroke-width' => 0.5, 'rx' => 3, 'ry' => 3,];
11
+$style = ['stroke' => 'lightgray', 'stroke-width' => 0.5, 'rx' => 3, 'ry' => 3, ];
12 12
 $colors = ['#1D4350', '#A43931'];
13 13
 
14 14
 $svg = new SVG(800, 800);
Please login to merge, or discard this patch.
example/blend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 $defs = new Defs($svg);
23 23
 
24 24
 $linearGradient = UniformGradient::uniformGradient($defs, ['#000000', '#ffffff', '#ff0000', '#808080'], null);
25
-KeyValueWriter::apply($linearGradient->getElement(), ['gradientUnits' => 'userSpaceOnUse', 'x1' => 100, 'y1' => 0, 'x2' => 300, 'y2' => 0,]);
25
+KeyValueWriter::apply($linearGradient->getElement(), ['gradientUnits' => 'userSpaceOnUse', 'x1' => 100, 'y1' => 0, 'x2' => 300, 'y2' => 0, ]);
26 26
 
27 27
 
28 28
 $defs->append($linearGradient);
Please login to merge, or discard this patch.
example/shapes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 $rect->ry = 5;
21 21
 $rect->stroke = 'darkgreen';
22 22
 $rect->fill = 'limegreen';
23
-$rect->strokeWidth = 1.5;  // In this particular case strokeWidth will be converted into stroke-width.
23
+$rect->strokeWidth = 1.5; // In this particular case strokeWidth will be converted into stroke-width.
24 24
 
25 25
 // Or use apply method.
26 26
 $rect->apply(['stroke' => 'darkgreen', 'fill' => 'limegreen', 'stroke-width' => 1.5]);
Please login to merge, or discard this patch.
example/colorMatrix.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 $defs = new Defs($svg);
21 21
 
22 22
 $linearGradient = UniformGradient::uniformGradient($defs, ['#ff00ff', '#88ff88', '#2020ff', '#d00000'], null);
23
-KeyValueWriter::apply($linearGradient->getElement(), ['gradientUnits' => 'userSpaceOnUse', 'x1' => 0, 'y1' => 0, 'x2' => $svg->getElement()->getAttribute('width'), 'y2' => 0,]);
23
+KeyValueWriter::apply($linearGradient->getElement(), ['gradientUnits' => 'userSpaceOnUse', 'x1' => 0, 'y1' => 0, 'x2' => $svg->getElement()->getAttribute('width'), 'y2' => 0, ]);
24 24
 
25 25
 $defs->append($linearGradient);
26 26
 
Please login to merge, or discard this patch.
example/motion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
 $path = new Path($svg, 100, 250);
26 26
 $path->id = 'path1';
27
-$path->curveTo(100,50, 400,50, 400,250);
27
+$path->curveTo(100, 50, 400, 50, 400, 250);
28 28
 $path->fill = "none";
29 29
 $path->stroke = "blue";
30 30
 $path->strokeWidth = 7.06;
Please login to merge, or discard this patch.