@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * @return string|null |
52 | 52 | */ |
53 | 53 | public function getRoman($number = null) |
54 | - { |
|
54 | + { |
|
55 | 55 | $this->result = null; |
56 | 56 | foreach($this->romanNumerals as $key => $value) |
57 | 57 | { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $number %= $value; |
61 | 61 | } |
62 | 62 | return $this->result; |
63 | - } |
|
63 | + } |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * @param null $roman |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | public function getRoman($number = null) |
54 | 54 | { |
55 | 55 | $this->result = null; |
56 | - foreach($this->romanNumerals as $key => $value) |
|
56 | + foreach ($this->romanNumerals as $key => $value) |
|
57 | 57 | { |
58 | 58 | $matches = (int)($number / $value); |
59 | 59 | $this->result .= str_repeat($key, $matches); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | public function getNumber($roman = null) |
70 | 70 | { |
71 | 71 | $this->result = null; |
72 | - foreach($this->romanNumerals as $key => $value) |
|
72 | + foreach ($this->romanNumerals as $key => $value) |
|
73 | 73 | { |
74 | 74 | while (strpos($roman, $key) === 0) |
75 | 75 | { |
@@ -29,28 +29,28 @@ |
||
29 | 29 | */ |
30 | 30 | class Roman extends Plugin |
31 | 31 | { |
32 | - /** |
|
33 | - * @var Roman |
|
34 | - */ |
|
35 | - public static $plugin; |
|
32 | + /** |
|
33 | + * @var Roman |
|
34 | + */ |
|
35 | + public static $plugin; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Init method |
39 | 39 | */ |
40 | 40 | public function init() |
41 | - { |
|
42 | - parent::init(); |
|
43 | - self::$plugin = $this; |
|
41 | + { |
|
42 | + parent::init(); |
|
43 | + self::$plugin = $this; |
|
44 | 44 | |
45 | - Event::on( |
|
46 | - CraftVariable::class, |
|
47 | - CraftVariable::EVENT_INIT, |
|
48 | - function (Event $event) { |
|
49 | - /** @var CraftVariable $variable */ |
|
50 | - $variable = $event->sender; |
|
51 | - $variable->set('roman', RomanVariable::class); |
|
52 | - } |
|
53 | - ); |
|
54 | - } |
|
45 | + Event::on( |
|
46 | + CraftVariable::class, |
|
47 | + CraftVariable::EVENT_INIT, |
|
48 | + function (Event $event) { |
|
49 | + /** @var CraftVariable $variable */ |
|
50 | + $variable = $event->sender; |
|
51 | + $variable->set('roman', RomanVariable::class); |
|
52 | + } |
|
53 | + ); |
|
54 | + } |
|
55 | 55 | |
56 | 56 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | Event::on( |
46 | 46 | CraftVariable::class, |
47 | 47 | CraftVariable::EVENT_INIT, |
48 | - function (Event $event) { |
|
48 | + function(Event $event) { |
|
49 | 49 | /** @var CraftVariable $variable */ |
50 | 50 | $variable = $event->sender; |
51 | 51 | $variable->set('roman', RomanVariable::class); |
@@ -28,8 +28,8 @@ |
||
28 | 28 | */ |
29 | 29 | public function getRoman($number = null) |
30 | 30 | { |
31 | - return Roman::$plugin->romanService->getRoman($number); |
|
32 | - } |
|
31 | + return Roman::$plugin->romanService->getRoman($number); |
|
32 | + } |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * @param null $romanNumerals |