Skip to content

Commit

Permalink
Refactor controllers for dependency injection (#221)
Browse files Browse the repository at this point in the history
* refactor controllers for dependency injection

* add editorconfig

* remove dependency injection from FormWebsiteController and exten ServiceSubscriber

* remove getter for container services

* remove FormWebsiteController service and constructor
  • Loading branch information
Prokyonn authored and alexander-schranz committed Jan 21, 2020
1 parent 28e2c1e commit eee1399
Show file tree
Hide file tree
Showing 9 changed files with 208 additions and 196 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

# markdown uses two trailing spaces for explicit line breaks
[*.md]
trim_trailing_whitespace = false
7 changes: 1 addition & 6 deletions Controller/DynamicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ public function __construct(
/**
* Return dynamic form entries.
*
* @param Request $request
*
* @return Response
*/
public function cgetAction(Request $request)
Expand Down Expand Up @@ -131,7 +129,7 @@ public function cgetAction(Request $request)
/**
* Delete dynamic form entry.
*
* @param Request $request
* @param $id
*
* @return Response
*/
Expand Down Expand Up @@ -184,8 +182,6 @@ protected function getFilters(Request $request)
/**
* Get form.
*
* @param Request $request
*
* @return Form
*/
protected function loadForm(Request $request)
Expand All @@ -202,7 +198,6 @@ protected function loadForm(Request $request)
/**
* Get locale.
*
* @param Request $request
* @return mixed
*/
public function getLocale(Request $request)
Expand Down
Loading

0 comments on commit eee1399

Please sign in to comment.