mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
refactor: remove unused method
This commit is contained in:
parent
76084cdcca
commit
8982995445
2 changed files with 0 additions and 28 deletions
|
@ -3,7 +3,6 @@ The `FormatAbstract` class implements the [`FormatInterface`](../08_Format_API/0
|
|||
* [setContentType](#the-setcontenttype-function)
|
||||
* [callContentType](#the-callcontenttype-function)
|
||||
* [sanitizeHtml](#the-sanitizehtml-function)
|
||||
* [array_trim](#the-array_trim-function)
|
||||
|
||||
# Functions
|
||||
|
||||
|
@ -30,11 +29,3 @@ The `sanitizeHtml` function receives an HTML formatted string and returns the st
|
|||
```PHP
|
||||
sanitizeHtml(string $html): string
|
||||
```
|
||||
|
||||
## The `array_trim` function
|
||||
|
||||
The `array_trim` function receives an array of strings and returns the same array with all elements trimmed (like using the `trim` function on all elements)
|
||||
|
||||
```PHP
|
||||
array_trim(array $elements): array
|
||||
```
|
||||
|
|
|
@ -181,23 +181,4 @@ abstract class FormatAbstract implements FormatInterface {
|
|||
// We leave alone object and embed so that videos can play in RSS readers.
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trim each element of an array
|
||||
*
|
||||
* This function applies `trim()` to all elements in the array, if the element
|
||||
* is a valid string.
|
||||
*
|
||||
* @param array $elements The array to trim
|
||||
* @return array The trimmed array
|
||||
*
|
||||
* @todo This is a utility function that doesn't belong here, find a new home.
|
||||
*/
|
||||
protected function array_trim($elements){
|
||||
foreach($elements as $key => $value) {
|
||||
if(is_string($value))
|
||||
$elements[$key] = trim($value);
|
||||
}
|
||||
return $elements;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue