Skip to content

Firefly III: a personal finances manager

Forgot to actually return the created array.

James Cole706b095f95fb
diff --git a/app/Http/Requests/TagFormRequest.php b/app/Http/Requests/TagFormRequest.php
index fb88f91c85..531770b38f 100644
--- a/app/Http/Requests/TagFormRequest.php
+++ b/app/Http/Requests/TagFormRequest.php
@@ -24,30 +24,6 @@ class TagFormRequest extends Request
return Auth::check();
}
- /**
- * @return array
- */
- public function rules()
- {
- $idRule = '';
- $tagRule = 'required|min:1|uniqueObjectForUser:tags,tag';
- if (Tag::find(Input::get('id'))) {
- $idRule = 'belongsToUser:tags';
- $tagRule = 'required|min:1|uniqueObjectForUser:tags,tag,' . Input::get('id');
- }
-
- return [
- 'tag' => $tagRule,
- 'id' => $idRule,
- 'description' => 'min:1',
- 'date' => 'date',
- 'latitude' => 'numeric|min:-90|max:90',
- 'longitude' => 'numeric|min:-90|max:90',
- 'zoomLevel' => 'numeric|min:0|max:80',
- 'tagMode' => 'required|in:nothing,balancingAct,advancePayment',
- ];
- }
-
/**
* @return array
*/
@@ -74,7 +50,32 @@ class TagFormRequest extends Request
'tagMode' => $this->get('tagMode'),
];
+ return $data;
}
+
+ /**
+ * @return array
+ */
+ public function rules()
+ {
+ $idRule = '';
+ $tagRule = 'required|min:1|uniqueObjectForUser:tags,tag';
+ if (Tag::find(Input::get('id'))) {
+ $idRule = 'belongsToUser:tags';
+ $tagRule = 'required|min:1|uniqueObjectForUser:tags,tag,' . Input::get('id');
+ }
+
+ return [
+ 'tag' => $tagRule,
+ 'id' => $idRule,
+ 'description' => 'min:1',
+ 'date' => 'date',
+ 'latitude' => 'numeric|min:-90|max:90',
+ 'longitude' => 'numeric|min:-90|max:90',
+ 'zoomLevel' => 'numeric|min:0|max:80',
+ 'tagMode' => 'required|in:nothing,balancingAct,advancePayment',
+ ];
+ }
}