Passed
Pull Request — master (#64)
by Robbie
02:18
created
src/Model/ResourceField.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function getCMSFields()
56 56
     {
57
-        $this->beforeUpdateCMSFields(function (FieldList $fields) {
57
+        $this->beforeUpdateCMSFields(function(FieldList $fields) {
58 58
             $originalTitle = ReadonlyField::create('Name', _t(
59
-                __CLASS__ . '.ORIGINAL_TITLE',
59
+                __CLASS__.'.ORIGINAL_TITLE',
60 60
                 'Original title'
61 61
             ))->setDescription(_t(
62
-                __CLASS__ . '.ORIGINAL_TITLE_DESCRIPTION',
62
+                __CLASS__.'.ORIGINAL_TITLE_DESCRIPTION',
63 63
                 'Title of this field as provided by the CKAN resource'
64 64
             ));
65 65
             $fields->replaceField('Name', $originalTitle);
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
             $fields->dataFieldByName('ReadableName')
69 69
                 ->setAttribute('placeholder', $this->Name);
70 70
             $orderField = NumericField::create('Order')
71
-                ->setTitle(_t(__CLASS__ . '.ORDER_LABEL', 'Presented order'))
71
+                ->setTitle(_t(__CLASS__.'.ORDER_LABEL', 'Presented order'))
72 72
                 ->setDescription(_t(
73
-                    __CLASS__ . '.ORDER_DENOMINATOR',
73
+                    __CLASS__.'.ORDER_DENOMINATOR',
74 74
                     'of {count} fields',
75 75
                     ['count' => static::get()->filter('ResourceID', $this->ResourceID)->count()]
76 76
                 ))
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             $duplicates = $fields->dataFieldByName('RemoveDuplicates')
85 85
                 ->addExtraClass('visibility-options__option');
86 86
 
87
-            $fields->removeByName(['ShowInSummaryView', 'ShowInDetailView', 'RemoveDuplicates',]);
87
+            $fields->removeByName(['ShowInSummaryView', 'ShowInDetailView', 'RemoveDuplicates', ]);
88 88
             $visibilityOptions = FieldGroup::create('Visibility', [$summary, $detail, $duplicates])
89 89
                 ->addExtraClass('visibility-options');
90 90
             $fields->insertBefore($visibilityOptions, 'Order');
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 'DisplayConditions',
96 96
                 ResultConditionsField::create(
97 97
                     'DisplayConditions',
98
-                    _t(__CLASS__ . '.RESULT_CONDITIONS', 'Result conditions')
98
+                    _t(__CLASS__.'.RESULT_CONDITIONS', 'Result conditions')
99 99
                 )
100 100
             );
101 101
         });
Please login to merge, or discard this patch.
src/Page/CKANRegistryPage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function getCMSFields()
47 47
     {
48
-        $this->beforeUpdateCMSFields(function (FieldList $fields) {
48
+        $this->beforeUpdateCMSFields(function(FieldList $fields) {
49 49
             $resource = $this->DataResource();
50 50
             $fields->addFieldToTab('Root.Data', ResourceLocatorField::create('DataResource'));
51 51
 
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
                         $columns = $component->getDisplayFields($resourceFields);
72 72
 
73 73
                         // We only want to change the labels for the GridField view, not the model's edit form
74
-                        $columns['ShowInSummaryView'] = _t(__CLASS__ . '.IN_RESULTS', 'In Results');
75
-                        $columns['ShowInDetailView'] = _t(__CLASS__ . '.IN_DETAIL', 'In Detail');
74
+                        $columns['ShowInSummaryView'] = _t(__CLASS__.'.IN_RESULTS', 'In Results');
75
+                        $columns['ShowInDetailView'] = _t(__CLASS__.'.IN_DETAIL', 'In Detail');
76 76
 
77 77
                         $editable = array_flip(['ShowInSummaryView', 'ShowInDetailView']);
78 78
                         $component->setDisplayFields(array_diff_key($columns, $editable));
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $fields = parent::getSettingsFields();
108 108
 
109 109
         $fields->addFieldsToTab('Root.Settings', [
110
-            TextField::create('ItemsPerPage', _t(__CLASS__ . '.ITEMS_PER_PAGE', 'Items per page')),
110
+            TextField::create('ItemsPerPage', _t(__CLASS__.'.ITEMS_PER_PAGE', 'Items per page')),
111 111
         ]);
112 112
 
113 113
         return $fields;
Please login to merge, or discard this patch.