Skip to content

Commit 3fb0603

Browse files
committed
Fix codestyle
1 parent 3e50fbb commit 3fb0603

File tree

2 files changed

+27
-33
lines changed

2 files changed

+27
-33
lines changed

src/MandelbrotSet.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111
class MandelbrotSet
1212
{
1313

14-
/**
15-
* @var string
16-
*/
14+
/** @var string */
1715
private $tempDir;
1816

17+
1918
/**
2019
* @param string $tempDir
2120
* @throws \Exception
@@ -34,6 +33,7 @@ public function __construct(string $tempDir)
3433
$this->tempDir = $tempDir;
3534
}
3635

36+
3737
/**
3838
* Load image from temp by Request and return as base64 image.
3939
*
@@ -49,6 +49,7 @@ public function loadImage(MandelbrotSetRequest $request): string
4949
return 'data:' . mime_content_type($path) . ';base64,' . base64_encode(file_get_contents($path));
5050
}
5151

52+
5253
/**
5354
* Process image by request and save to temp file.
5455
*
@@ -117,7 +118,9 @@ public function generate(MandelbrotSetRequest $request): void
117118
imagedestroy($im);
118119
}
119120

121+
120122
/**
123+
* @deprecated
121124
* @param int $width
122125
* @param int $height
123126
*/
@@ -190,5 +193,4 @@ public function renderAll(int $width = 300, int $height = 300): void
190193
}
191194
echo '</table>';
192195
}
193-
194196
}

src/MandelbrotSetRequest.php

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,36 @@
99

1010
class MandelbrotSetRequest
1111
{
12-
1312
use SmartObject;
1413

15-
/**
16-
* @var int
17-
*/
14+
/** @var int */
1815
private $width;
1916

20-
/**
21-
* @var int
22-
*/
17+
/** @var int */
2318
private $height;
2419

25-
/**
26-
* @var int
27-
*/
20+
/** @var int */
2821
private $iterations;
2922

30-
/**
31-
* @var float
32-
*/
23+
/** @var float */
3324
private $minX;
3425

35-
/**
36-
* @var float
37-
*/
26+
/** @var float */
3827
private $maxX;
3928

40-
/**
41-
* @var float
42-
*/
29+
/** @var float */
4330
private $minY;
4431

45-
/**
46-
* @var float
47-
*/
32+
/** @var float */
4833
private $maxY;
4934

50-
/**
51-
* @var int
52-
*/
35+
/** @var int */
5336
private $deltaA;
5437

55-
/**
56-
* @var int
57-
*/
38+
/** @var int */
5839
private $deltaB;
5940

41+
6042
/**
6143
* @param int $deltaA
6244
* @param int $deltaB
@@ -84,6 +66,7 @@ public function __construct(
8466
$this->deltaB = $deltaB;
8567
}
8668

69+
8770
/**
8871
* @return int[]
8972
*/
@@ -96,11 +79,13 @@ public function getParams(): array
9679
];
9780
}
9881

82+
9983
public function getFileName(): string
10084
{
10185
return implode('_', $this->getParams()) . '.png';
10286
}
10387

88+
10489
/**
10590
* @return int
10691
*/
@@ -109,6 +94,7 @@ public function getWidth(): int
10994
return $this->width;
11095
}
11196

97+
11298
/**
11399
* @return int
114100
*/
@@ -117,6 +103,7 @@ public function getHeight(): int
117103
return $this->height;
118104
}
119105

106+
120107
/**
121108
* @return int
122109
*/
@@ -125,6 +112,7 @@ public function getIterations(): int
125112
return $this->iterations;
126113
}
127114

115+
128116
/**
129117
* @return float
130118
*/
@@ -133,6 +121,7 @@ public function getMinX(): float
133121
return $this->minX;
134122
}
135123

124+
136125
/**
137126
* @return float
138127
*/
@@ -141,6 +130,7 @@ public function getMaxX(): float
141130
return $this->maxX;
142131
}
143132

133+
144134
/**
145135
* @return float
146136
*/
@@ -149,6 +139,7 @@ public function getMinY(): float
149139
return $this->minY;
150140
}
151141

142+
152143
/**
153144
* @return float
154145
*/
@@ -157,6 +148,7 @@ public function getMaxY(): float
157148
return $this->maxY;
158149
}
159150

151+
160152
/**
161153
* @return int
162154
*/
@@ -165,12 +157,12 @@ public function getDeltaA(): int
165157
return $this->deltaA;
166158
}
167159

160+
168161
/**
169162
* @return int
170163
*/
171164
public function getDeltaB(): int
172165
{
173166
return $this->deltaB;
174167
}
175-
176168
}

0 commit comments

Comments
 (0)