Passed
Pull Request — master (#90)
by Robbie
02:21
created
src/Model/ResourceField.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@  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
             $originalLabel = ReadonlyField::create('OriginalLabel')
59 59
                 ->setDescription(_t(
60
-                    __CLASS__ . '.ORIGINAL_LABEL_DESCRIPTION',
60
+                    __CLASS__.'.ORIGINAL_LABEL_DESCRIPTION',
61 61
                     'Title of this field as provided by the CKAN resource'
62 62
                 ));
63 63
             $fields->replaceField('OriginalLabel', $originalLabel);
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
             $fields->removeByName('Type');
69 69
 
70 70
             $positionField = NumericField::create('Position')
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} columns',
75 75
                     ['count' => static::get()->filter('ResourceID', $this->ResourceID)->count()]
76 76
                 ))
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 ->addExtraClass('visibility-options__option');
84 84
             $duplicates = $fields->dataFieldByName('RemoveDuplicates')
85 85
                 ->setTitle(
86
-                    _t(__CLASS__ . '.REMOVE_DUPLICATES_LABEL', 'Only show one value if duplicates exist')
86
+                    _t(__CLASS__.'.REMOVE_DUPLICATES_LABEL', 'Only show one value if duplicates exist')
87 87
                 )
88 88
                 ->addExtraClass('visibility-options__option');
89 89
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 'DisplayConditions',
100 100
                 ResultConditionsField::create(
101 101
                     'DisplayConditions',
102
-                    _t(__CLASS__ . '.RESULT_CONDITIONS', 'Result conditions')
102
+                    _t(__CLASS__.'.RESULT_CONDITIONS', 'Result conditions')
103 103
                 )
104 104
             );
105 105
 
Please login to merge, or discard this patch.
src/Model/ResourceFilter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     public function getCMSFields()
62 62
     {
63
-        $this->beforeUpdateCMSFields(function (FieldList $fields) {
63
+        $this->beforeUpdateCMSFields(function(FieldList $fields) {
64 64
             $allColumnsField = $fields->dataFieldByName('AllColumns');
65 65
             $allColumnsField->addExtraClass('ckan-columns__all-columns');
66 66
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
             $columnSources = CompositeField::create($allColumnsField, $filterFields);
79 79
             $columnSources
80
-                ->setTitle(_t(__CLASS__ . '.COLUMNS_SOURCES', 'Columns source(s)'))
80
+                ->setTitle(_t(__CLASS__.'.COLUMNS_SOURCES', 'Columns source(s)'))
81 81
                 ->addExtraClass('ckan-columns__sources');
82 82
             $fields->push($columnSources);
83 83
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             return DBField::create_Field(
133 133
                 'HTMLFragment',
134 134
                 '<span class="ckan-columns--all-columns">'
135
-                . _t(__CLASS__ . '.ALL_COLUMNS', 'All columns')
135
+                . _t(__CLASS__.'.ALL_COLUMNS', 'All columns')
136 136
                 . '</span>'
137 137
             );
138 138
         }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         return DBField::create_Field(
149 149
             'HTMLFragment',
150 150
             '<span class="ckan-columns--multiple">'
151
-            . _t(__CLASS__ . '.MULTIPLE_COLUMNS', 'Multiple columns')
151
+            . _t(__CLASS__.'.MULTIPLE_COLUMNS', 'Multiple columns')
152 152
             . '</span>'
153 153
         );
154 154
     }
Please login to merge, or discard this patch.
src/Page/CKANRegistryPage.php 1 patch
Spacing   +5 added lines, -5 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,11 +71,11 @@  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['ShowInResultsView'] = _t(__CLASS__ . '.IN_RESULTS', 'In Results');
75
-                        $columns['ShowInDetailView'] = _t(__CLASS__ . '.IN_DETAIL', 'In Detail');
74
+                        $columns['ShowInResultsView'] = _t(__CLASS__.'.IN_RESULTS', 'In Results');
75
+                        $columns['ShowInDetailView'] = _t(__CLASS__.'.IN_DETAIL', 'In Detail');
76 76
 
77 77
                         // Abbreviate the position title
78
-                        $columns['Position'] = _t(__CLASS__ . '.POS', 'Pos.', 'Abbreviated version of position');
78
+                        $columns['Position'] = _t(__CLASS__.'.POS', 'Pos.', 'Abbreviated version of position');
79 79
 
80 80
                         $editable = array_flip(['ShowInResultsView', 'ShowInDetailView']);
81 81
                         $component->setDisplayFields(array_diff_key($columns, $editable));
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $fields = parent::getSettingsFields();
111 111
 
112 112
         $fields->addFieldsToTab('Root.Settings', [
113
-            TextField::create('ItemsPerPage', _t(__CLASS__ . '.ITEMS_PER_PAGE', 'Items per page')),
113
+            TextField::create('ItemsPerPage', _t(__CLASS__.'.ITEMS_PER_PAGE', 'Items per page')),
114 114
         ]);
115 115
 
116 116
         return $fields;
Please login to merge, or discard this patch.