@@ -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); |
@@ -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 | $fields->addFieldToTab('Root.Main', TextField::create('Title')->setTitle('Ingredient and measurement')); |
| 68 | 68 | $fields->removeByName('Sort'); |
| 69 | 69 | }); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @param array $context |
| 77 | 77 | * @return bool |
| 78 | 78 | */ |
| 79 | - public function canCreate($member = null, $context = []) |
|
| 79 | + public function canCreate($member = null, $context = [ ]) |
|
| 80 | 80 | { |
| 81 | 81 | return true; |
| 82 | 82 | } |
@@ -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 | $fields->addFieldToTab( |
| 53 | 53 | 'Root.Main', |
| 54 | 54 | HTMLEditorField::create('Title') |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * @param array $context |
| 68 | 68 | * @return bool |
| 69 | 69 | */ |
| 70 | - public function canCreate($member = null, $context = []) |
|
| 70 | + public function canCreate($member = null, $context = [ ]) |
|
| 71 | 71 | { |
| 72 | 72 | return true; |
| 73 | 73 | } |