Skip to content

Commit f03cc59

Browse files
committed
Add native types to TransformationsInterface methods
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent c62dceb commit f03cc59

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+108
-324
lines changed

libraries/classes/Plugins/Transformations/Abs/Bool2TextTransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ abstract class Bool2TextTransformationsPlugin extends TransformationsPlugin
1919
{
2020
/**
2121
* Gets the transformation description of the specific plugin
22-
*
23-
* @return string
2422
*/
25-
public static function getInfo()
23+
public static function getInfo(): string
2624
{
2725
return __(
2826
'Converts Boolean values to text (default \'T\' and \'F\').'
@@ -55,10 +53,8 @@ public function applyTransformation($buffer, array $options = [], ?FieldMetadata
5553

5654
/**
5755
* Gets the transformation name of the specific plugin
58-
*
59-
* @return string
6056
*/
61-
public static function getName()
57+
public static function getName(): string
6258
{
6359
return 'Bool2Text';
6460
}

libraries/classes/Plugins/Transformations/Abs/DateFormatTransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ abstract class DateFormatTransformationsPlugin extends TransformationsPlugin
3030
{
3131
/**
3232
* Gets the transformation description of the specific plugin
33-
*
34-
* @return string
3533
*/
36-
public static function getInfo()
34+
public static function getInfo(): string
3735
{
3836
return __(
3937
'Displays a TIME, TIMESTAMP, DATETIME or numeric unix timestamp'
@@ -153,10 +151,8 @@ public function applyTransformation($buffer, array $options = [], ?FieldMetadata
153151

154152
/**
155153
* Gets the transformation name of the specific plugin
156-
*
157-
* @return string
158154
*/
159-
public static function getName()
155+
public static function getName(): string
160156
{
161157
return 'Date Format';
162158
}

libraries/classes/Plugins/Transformations/Abs/DownloadTransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ abstract class DownloadTransformationsPlugin extends TransformationsPlugin
2222
{
2323
/**
2424
* Gets the transformation description of the specific plugin
25-
*
26-
* @return string
2725
*/
28-
public static function getInfo()
26+
public static function getInfo(): string
2927
{
3028
return __(
3129
'Displays a link to download the binary data of the column. You can'
@@ -88,10 +86,8 @@ public function applyTransformation($buffer, array $options = [], ?FieldMetadata
8886

8987
/**
9088
* Gets the transformation name of the specific plugin
91-
*
92-
* @return string
9389
*/
94-
public static function getName()
90+
public static function getName(): string
9591
{
9692
return 'Download';
9793
}

libraries/classes/Plugins/Transformations/Abs/ExternalTransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ abstract class ExternalTransformationsPlugin extends TransformationsPlugin
3333
{
3434
/**
3535
* Gets the transformation description of the specific plugin
36-
*
37-
* @return string
3836
*/
39-
public static function getInfo()
37+
public static function getInfo(): string
4038
{
4139
return __(
4240
'LINUX ONLY: Launches an external application and feeds it the column'
@@ -166,10 +164,8 @@ public function applyTransformation($buffer, array $options = [], ?FieldMetadata
166164

167165
/**
168166
* Gets the transformation name of the specific plugin
169-
*
170-
* @return string
171167
*/
172-
public static function getName()
168+
public static function getName(): string
173169
{
174170
return 'External';
175171
}

libraries/classes/Plugins/Transformations/Abs/FormattedTransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ abstract class FormattedTransformationsPlugin extends TransformationsPlugin
2020
{
2121
/**
2222
* Gets the transformation description of the specific plugin
23-
*
24-
* @return string
2523
*/
26-
public static function getInfo()
24+
public static function getInfo(): string
2725
{
2826
return __(
2927
'Displays the contents of the column as-is, without running it'
@@ -52,10 +50,8 @@ public function applyTransformation($buffer, array $options = [], ?FieldMetadata
5250

5351
/**
5452
* Gets the transformation name of the specific plugin
55-
*
56-
* @return string
5753
*/
58-
public static function getName()
54+
public static function getName(): string
5955
{
6056
return 'Formatted';
6157
}

libraries/classes/Plugins/Transformations/Abs/HexTransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ abstract class HexTransformationsPlugin extends TransformationsPlugin
2222
{
2323
/**
2424
* Gets the transformation description of the specific plugin
25-
*
26-
* @return string
2725
*/
28-
public static function getInfo()
26+
public static function getInfo(): string
2927
{
3028
return __(
3129
'Displays hexadecimal representation of data. Optional first'
@@ -61,10 +59,8 @@ public function applyTransformation($buffer, array $options = [], ?FieldMetadata
6159

6260
/**
6361
* Gets the transformation name of the specific plugin
64-
*
65-
* @return string
6662
*/
67-
public static function getName()
63+
public static function getName(): string
6864
{
6965
return 'Hex';
7066
}

libraries/classes/Plugins/Transformations/Abs/ImageLinkTransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ abstract class ImageLinkTransformationsPlugin extends TransformationsPlugin
2121
{
2222
/**
2323
* Gets the transformation description of the specific plugin
24-
*
25-
* @return string
2624
*/
27-
public static function getInfo()
25+
public static function getInfo(): string
2826
{
2927
return __('Displays a link to download this image.');
3028
}
@@ -54,10 +52,8 @@ public function applyTransformation($buffer, array $options = [], ?FieldMetadata
5452

5553
/**
5654
* Gets the transformation name of the specific plugin
57-
*
58-
* @return string
5955
*/
60-
public static function getName()
56+
public static function getName(): string
6157
{
6258
return 'ImageLink';
6359
}

libraries/classes/Plugins/Transformations/Abs/ImageUploadTransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ abstract class ImageUploadTransformationsPlugin extends IOTransformationsPlugin
2222
{
2323
/**
2424
* Gets the transformation description of the specific plugin
25-
*
26-
* @return string
2725
*/
28-
public static function getInfo()
26+
public static function getInfo(): string
2927
{
3028
return __(
3129
'Image upload functionality which also displays a thumbnail.'
@@ -110,10 +108,8 @@ public function getScripts()
110108

111109
/**
112110
* Gets the transformation name of the specific plugin
113-
*
114-
* @return string
115111
*/
116-
public static function getName()
112+
public static function getName(): string
117113
{
118114
return 'Image upload';
119115
}

libraries/classes/Plugins/Transformations/Abs/InlineTransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ abstract class InlineTransformationsPlugin extends TransformationsPlugin
2222
{
2323
/**
2424
* Gets the transformation description of the specific plugin
25-
*
26-
* @return string
2725
*/
28-
public static function getInfo()
26+
public static function getInfo(): string
2927
{
3028
return __(
3129
'Displays a clickable thumbnail. The options are the maximum width'
@@ -66,10 +64,8 @@ public function applyTransformation($buffer, array $options = [], ?FieldMetadata
6664

6765
/**
6866
* Gets the transformation name of the specific plugin
69-
*
70-
* @return string
7167
*/
72-
public static function getName()
68+
public static function getName(): string
7369
{
7470
return 'Inline';
7571
}

libraries/classes/Plugins/Transformations/Abs/LongToIPv4TransformationsPlugin.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ abstract class LongToIPv4TransformationsPlugin extends TransformationsPlugin
2121
{
2222
/**
2323
* Gets the transformation description of the specific plugin
24-
*
25-
* @return string
2624
*/
27-
public static function getInfo()
25+
public static function getInfo(): string
2826
{
2927
return __(
3028
'Converts an (IPv4) Internet network address stored as a BIGINT'
@@ -50,10 +48,8 @@ public function applyTransformation($buffer, array $options = [], ?FieldMetadata
5048

5149
/**
5250
* Gets the transformation name of the specific plugin
53-
*
54-
* @return string
5551
*/
56-
public static function getName()
52+
public static function getName(): string
5753
{
5854
return 'Long To IPv4';
5955
}

0 commit comments

Comments
 (0)