Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w authored and github-actions[bot] committed Jan 6, 2025
1 parent ed6852d commit 1b25f43
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion lib/yform/value/number_lat.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

class rex_yform_value_number_lat extends rex_yform_value_number
{

public function getDescription(): string
{
return 'number_lat|name|label|precision|scale|defaultwert|[no_db]|[unit]|[notice]|[attributes]';
Expand Down
1 change: 0 additions & 1 deletion lib/yform/value/number_lng.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

class rex_yform_value_number_lng extends rex_yform_value_number
{

public function getDescription(): string
{
return 'number_lng|name|label|precision|scale|defaultwert|[no_db]|[unit]|[notice]|[attributes]';
Expand Down
3 changes: 1 addition & 2 deletions lib/yform/value/seo_title.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ public function postFormAction(): void
if (isset($this->params['value_pool']['sql'][$name])) {
$value .= ' ' . $this->params['value_pool']['sql'][$name];
continue;
} else {
$value .= trim($name, '"\'');
}
$value .= trim($name, '"\'');

$name = explode('.', $name);
if (count($name) > 1) {
Expand Down
1 change: 0 additions & 1 deletion lib/yform/value/showvalue_extended.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ public function getDefinitions(): array
'db_type' => ['text', 'varchar(191)', 'mediumtext', 'longtext'],
];
}

}
8 changes: 3 additions & 5 deletions lib/yform/value/thumbnailws.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,25 @@ public function postFormAction(): void
$apiKey = $this->getElement(3);
$query['url'] = $sourceUrl;
$apiUrl = "https://api.thumbnail.ws/api/$apiKey/thumbnail/get?" . http_build_query($query);

dump($sourceField, $targetField, $apiKey, $apiUrl);

try {
$socket = rex_socket::factoryUrl($apiUrl);
$response = $socket->doGet();

if (!$response->isOk()) {
dump($response, "Fehler bei der API-Anfrage.");
dump($response, 'Fehler bei der API-Anfrage.');
}

$result = $response->getBody();
$response = json_decode($result, true);

dump($response);
$this->params['value_pool']['email'][$targetField] = json_encode($response);

} catch (rex_socket_exception $e) {
dump("Fehler bei der API-Anfrage: " . $e->getMessage());
dump('Fehler bei der API-Anfrage: ' . $e->getMessage());
}

}

public function getDescription(): string
Expand Down

0 comments on commit 1b25f43

Please sign in to comment.