@@ -128,14 +128,14 @@ discard block |
||
128 | 128 | /** |
129 | 129 | * @var array |
130 | 130 | */ |
131 | - private static $allowed_children = []; |
|
131 | + private static $allowed_children = [ ]; |
|
132 | 132 | |
133 | 133 | /** |
134 | 134 | * @return FieldList |
135 | 135 | */ |
136 | 136 | public function getCMSFields() |
137 | 137 | { |
138 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
138 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
139 | 139 | |
140 | 140 | $fields->addFieldsToTab( |
141 | 141 | 'Root.Main', |
@@ -231,10 +231,10 @@ discard block |
||
231 | 231 | */ |
232 | 232 | public function getCategoryList() |
233 | 233 | { |
234 | - $categories[] = $this->ParentID; |
|
234 | + $categories[ ] = $this->ParentID; |
|
235 | 235 | |
236 | 236 | foreach ($this->Categories() as $cat) { |
237 | - $categories[] = $cat->ID; |
|
237 | + $categories[ ] = $cat->ID; |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | $records = RecipeCategoryPage::get()->byIDs($categories); |
@@ -70,7 +70,7 @@ |
||
70 | 70 | */ |
71 | 71 | public function getCMSFields() |
72 | 72 | { |
73 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
73 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
74 | 74 | if ($this->ID) { |
75 | 75 | $config = GridFieldConfig_RelationEditor::create() |
76 | 76 | ->addComponent(new GridFieldOrderableRows('SortOrder')) |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | public function getCMSFields() |
62 | 62 | { |
63 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
63 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
64 | 64 | $fields->addFieldToTab( |
65 | 65 | 'Root.Main', |
66 | 66 | NumericField::create('RecipesPerPage') |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | public function getRecipeList() |
82 | 82 | { |
83 | 83 | $categories = RecipeCategoryPage::get()->filter('ParentID', $this->data()->ID)->column('ID'); |
84 | - $categories[] = $this->data()->ID; |
|
84 | + $categories[ ] = $this->data()->ID; |
|
85 | 85 | |
86 | 86 | $recipes = RecipePage::get() |
87 | 87 | ->filterAny([ |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | $recipes = $this->data()->getRecipeList(); |
21 | 21 | |
22 | - $start = ($request->getVar('start')) ? (int)$request->getVar('start') : 0; |
|
22 | + $start = ($request->getVar('start')) ? (int) $request->getVar('start') : 0; |
|
23 | 23 | |
24 | 24 | $records = PaginatedList::create($recipes, $request); |
25 | 25 | $records->setPageStart($start); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function getCMSFields() |
50 | 50 | { |
51 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
51 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
52 | 52 | $recipe = $fields->dataFieldByName('RecipeID'); |
53 | 53 | $fields->replaceField('RecipeID', $recipe->performReadonlyTransformation()); |
54 | 54 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @param array $context |
83 | 83 | * @return bool |
84 | 84 | */ |
85 | - public function canCreate($member = null, $context = []) |
|
85 | + public function canCreate($member = null, $context = [ ]) |
|
86 | 86 | { |
87 | 87 | return true; |
88 | 88 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function getCMSFields() |
65 | 65 | { |
66 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
66 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
67 | 67 | $recipe = $fields->dataFieldByName('RecipeID'); |
68 | 68 | $fields->replaceField('RecipeID', $recipe->performReadonlyTransformation()); |
69 | 69 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * @param array $context |
92 | 92 | * @return bool |
93 | 93 | */ |
94 | - public function canCreate($member = null, $context = []) |
|
94 | + public function canCreate($member = null, $context = [ ]) |
|
95 | 95 | { |
96 | 96 | return true; |
97 | 97 | } |