forked from projects/fipamo
Formating tweaks, minor controller edits
There were some outstanding changes made a few months ago that haven't been checked in, so getting those as the final commit before the transition to Laravel
This commit is contained in:
parent
49c1f2d3f2
commit
c29513945b
4 changed files with 10 additions and 7 deletions
1
brain/controller/.php-cs-fixer.cache
Normal file
1
brain/controller/.php-cs-fixer.cache
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"php":"8.1.12","version":"3.13.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"braces":{"allow_single_line_closure":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":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,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_indentation":true,"array_syntax":{"syntax":"short"},"combine_consecutive_unsets":true,"method_chaining_indentation":true,"class_attributes_separation":{"elements":{"const":"none","method":"one","property":"none","trait_import":"none"}},"multiline_whitespace_before_semicolons":{"strategy":"no_multi_line"},"binary_operator_spaces":{"default":"single_space","operators":{"=":"align_single_space_minimal","=>":"align_single_space_minimal"}},"concat_space":{"spacing":"one"},"function_typehint_space":true,"single_line_comment_style":{"comment_types":["hash"]},"include":true,"no_extra_blank_lines":{"tokens":["curly_brace_block","extra","parenthesis_brace_block","throw"]},"no_multiline_whitespace_around_double_arrow":true,"no_spaces_around_offset":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"object_operator_without_whitespace":true,"trim_array_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true},"hashes":{"tmpixxwnz.php":"f4358c77accfedac014932cd885cbf99","tmpqkj20z.php":"f4358c77accfedac014932cd885cbf99","tmpto8q2x.php":"ca7dc7ebe4bbcde2f41325162327aa81","tmpv1ofcp.php":"ca7dc7ebe4bbcde2f41325162327aa81","tmp3nqyas.php":"ca7dc7ebe4bbcde2f41325162327aa81","tmp12kssw.php":"ca7dc7ebe4bbcde2f41325162327aa81"}}
|
|
@ -61,7 +61,7 @@ class DashControl
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
header('Location: /dashboard');
|
header('Location: /dashboard');
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -77,7 +77,7 @@ class DashControl
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
header('Location: /dashboard');
|
header('Location: /dashboard');
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'pages':
|
case 'pages':
|
||||||
|
@ -99,7 +99,7 @@ class DashControl
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
header('Location: /dashboard');
|
header('Location: /dashboard');
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'page':
|
case 'page':
|
||||||
|
@ -113,7 +113,7 @@ class DashControl
|
||||||
$page = (new Book())->findPageById($uuid);
|
$page = (new Book())->findPageById($uuid);
|
||||||
$views = [];
|
$views = [];
|
||||||
if (!isset($page['layout'])) {
|
if (!isset($page['layout'])) {
|
||||||
$page['layout'] = "page";
|
$page['layout'] = 'page';
|
||||||
}
|
}
|
||||||
if (str_contains($page['layout'], 'index')) {
|
if (str_contains($page['layout'], 'index')) {
|
||||||
$views = (new Themes())->getCustomIndex();
|
$views = (new Themes())->getCustomIndex();
|
||||||
|
@ -186,13 +186,13 @@ class DashControl
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
header('Location: /dashboard');
|
header('Location: /dashboard');
|
||||||
exit();
|
exit;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'logout':
|
case 'logout':
|
||||||
Session::kill();
|
Session::kill();
|
||||||
header('Location: /dashboard');
|
header('Location: /dashboard');
|
||||||
exit();
|
exit;
|
||||||
break;
|
break;
|
||||||
case 'reset-password':
|
case 'reset-password':
|
||||||
$template = 'dash/reset-password.twig';
|
$template = 'dash/reset-password.twig';
|
||||||
|
|
|
@ -41,6 +41,7 @@ class RouteControl
|
||||||
'type' => 'TASK_NONE',
|
'type' => 'TASK_NONE',
|
||||||
];
|
];
|
||||||
$response->getBody()->write(json_encode($result));
|
$response->getBody()->write(json_encode($result));
|
||||||
|
|
||||||
return $response->withHeader('Content-Type', 'application/json');
|
return $response->withHeader('Content-Type', 'application/json');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
brain/data/.php-cs-fixer.cache
Normal file
1
brain/data/.php-cs-fixer.cache
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"php":"8.1.12","version":"3.13.0","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"braces":{"allow_single_line_closure":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":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,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_indentation":true,"array_syntax":{"syntax":"short"},"combine_consecutive_unsets":true,"method_chaining_indentation":true,"class_attributes_separation":{"elements":{"const":"none","method":"one","property":"none","trait_import":"none"}},"multiline_whitespace_before_semicolons":{"strategy":"no_multi_line"},"binary_operator_spaces":{"default":"single_space","operators":{"=":"align_single_space_minimal","=>":"align_single_space_minimal"}},"concat_space":{"spacing":"one"},"function_typehint_space":true,"single_line_comment_style":{"comment_types":["hash"]},"include":true,"no_extra_blank_lines":{"tokens":["curly_brace_block","extra","parenthesis_brace_block","throw"]},"no_multiline_whitespace_around_double_arrow":true,"no_spaces_around_offset":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"object_operator_without_whitespace":true,"trim_array_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true},"hashes":{"tmptx_2lh.php":"fbbaef6c1d64a3237a34403b9e4c51c0","tmpy4bagr.php":"fbbaef6c1d64a3237a34403b9e4c51c0"}}
|
Loading…
Reference in a new issue