clean up php with php-cs-fixer

This commit is contained in:
Santiago Lema 2025-08-21 03:02:34 +00:00
parent e53b4866b8
commit 1aaae0c4e3
2 changed files with 167 additions and 169 deletions

1
.php-cs-fixer.cache Normal file
View file

@ -0,0 +1 @@
{"php":"8.2.29","version":"3.86.0:v3.86.0#4a952bd19dc97879b0620f495552ef09b55f7d36","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"hashes":{"fedi_slurp.php":"2cbe2b549c703ecb4a3be4f2e15694f9"}}

View file

@ -96,13 +96,10 @@ foreach ($bookmarks as $status) {
}
}
if (isset($links))
{
if (isset($links)) {
echo "Valid URLS:".count($links)."\n";
print_r($links);
}
else
{
} else {
echo "NO links founds. Kthxbye \n";
die(0);
@ -219,7 +216,8 @@ curl_close($ch);
} // end accounts loop
function loadAccounts(string $filepath): array {
function loadAccounts(string $filepath): array
{
$accounts = [];
if (!file_exists($filepath)) {
@ -230,7 +228,9 @@ function loadAccounts(string $filepath): array {
foreach ($lines as $line) {
$line = trim($line);
if ($line === '') continue;
if ($line === '') {
continue;
}
[$host, $token] = explode('|', $line, 2);
$accounts[] = [
@ -241,6 +241,3 @@ function loadAccounts(string $filepath): array {
return $accounts;
}