| @@ -56,8 +56,8 @@ | ||
| 56 | 56 | public static function getMatchOptions() | 
| 57 | 57 |      { | 
| 58 | 58 | return [ | 
| 59 | - ['value' => self::MATCH_TYPE_MUST, 'title' => _t(__CLASS__ . '.MUST_MATCH', 'Must match')], | |
| 60 | - ['value' => self::MATCH_TYPE_MUST_NOT, 'title' => _t(__CLASS__ . '.MUST_NOT_MATCH', 'Must not match')], | |
| 59 | + ['value' => self::MATCH_TYPE_MUST, 'title' => _t(__CLASS__.'.MUST_MATCH', 'Must match')], | |
| 60 | + ['value' => self::MATCH_TYPE_MUST_NOT, 'title' => _t(__CLASS__.'.MUST_NOT_MATCH', 'Must not match')], | |
| 61 | 61 | ]; | 
| 62 | 62 | } | 
| 63 | 63 | } | 
| @@ -78,8 +78,8 @@ | ||
| 78 | 78 | public static function getSelectTypes() | 
| 79 | 79 |      { | 
| 80 | 80 | return [ | 
| 81 | - ['value' => self::SELECT_TYPE_ALL, 'title' => _t(__CLASS__ . '.SELECT_ALL', 'Select from all options')], | |
| 82 | - ['value' => self::SELECT_TYPE_CUSTOM, 'title' => _t(__CLASS__ . '.SELECT_CUSTOM', 'Manually add options')], | |
| 81 | + ['value' => self::SELECT_TYPE_ALL, 'title' => _t(__CLASS__.'.SELECT_ALL', 'Select from all options')], | |
| 82 | + ['value' => self::SELECT_TYPE_CUSTOM, 'title' => _t(__CLASS__.'.SELECT_CUSTOM', 'Manually add options')], | |
| 83 | 83 | ]; | 
| 84 | 84 | } | 
| 85 | 85 | |
| @@ -54,10 +54,10 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | |
| @@ -46,7 +46,7 @@ discard block | ||
| 46 | 46 | |
| 47 | 47 | public function getCMSFields() | 
| 48 | 48 |      { | 
| 49 | -        $this->beforeUpdateCMSFields(function (FieldList $fields) { | |
| 49 | +        $this->beforeUpdateCMSFields(function(FieldList $fields) { | |
| 50 | 50 | $resource = $this->DataResource(); | 
| 51 | 51 | |
| 52 | 52 | $fields->addFieldToTab( | 
| @@ -81,11 +81,11 @@ discard block | ||
| 81 | 81 | $columns = $component->getDisplayFields($resourceFields); | 
| 82 | 82 | |
| 83 | 83 | // We only want to change the labels for the GridField view, not the model's edit form | 
| 84 | - $columns['ShowInResultsView'] = _t(__CLASS__ . '.IN_RESULTS', 'In Results'); | |
| 85 | - $columns['ShowInDetailView'] = _t(__CLASS__ . '.IN_DETAIL', 'In Detail'); | |
| 84 | + $columns['ShowInResultsView'] = _t(__CLASS__.'.IN_RESULTS', 'In Results'); | |
| 85 | + $columns['ShowInDetailView'] = _t(__CLASS__.'.IN_DETAIL', 'In Detail'); | |
| 86 | 86 | |
| 87 | 87 | // Abbreviate the position title | 
| 88 | - $columns['Position'] = _t(__CLASS__ . '.POS', 'Pos.', 'Abbreviated version of position'); | |
| 88 | + $columns['Position'] = _t(__CLASS__.'.POS', 'Pos.', 'Abbreviated version of position'); | |
| 89 | 89 | |
| 90 | 90 | $editable = array_flip(['ShowInResultsView', 'ShowInDetailView']); | 
| 91 | 91 | $component->setDisplayFields(array_diff_key($columns, $editable)); | 
| @@ -121,7 +121,7 @@ discard block | ||
| 121 | 121 | $fields = parent::getSettingsFields(); | 
| 122 | 122 | |
| 123 | 123 |          $fields->addFieldsToTab('Root.Settings', [ | 
| 124 | -            TextField::create('ItemsPerPage', _t(__CLASS__ . '.ITEMS_PER_PAGE', 'Items per page')), | |
| 124 | +            TextField::create('ItemsPerPage', _t(__CLASS__.'.ITEMS_PER_PAGE', 'Items per page')), | |
| 125 | 125 | ]); | 
| 126 | 126 | |
| 127 | 127 | return $fields; | 
| @@ -18,7 +18,7 @@ discard block | ||
| 18 | 18 | use Injectable; | 
| 19 | 19 | |
| 20 | 20 | private static $dependencies = [ | 
| 21 | - 'GuzzleClient' => '%$' . Client::class, | |
| 21 | + 'GuzzleClient' => '%$'.Client::class, | |
| 22 | 22 | ]; | 
| 23 | 23 | |
| 24 | 24 | /** | 
| @@ -84,7 +84,7 @@ discard block | ||
| 84 | 84 | |
| 85 | 85 | $statusCode = $response->getStatusCode(); | 
| 86 | 86 |          if ($statusCode < 200 || $statusCode >= 300) { | 
| 87 | -            throw new RuntimeException('CKAN API is not available. Error code ' . $statusCode); | |
| 87 | +            throw new RuntimeException('CKAN API is not available. Error code '.$statusCode); | |
| 88 | 88 | } | 
| 89 | 89 | |
| 90 | 90 |          if (!count(preg_grep('#application/json#', $response->getHeader('Content-Type')))) { | 
| @@ -16,7 +16,7 @@ | ||
| 16 | 16 | use Injectable; | 
| 17 | 17 | |
| 18 | 18 | private static $dependencies = [ | 
| 19 | - 'APIClient' => '%$' . APIClientInterface::class, | |
| 19 | + 'APIClient' => '%$'.APIClientInterface::class, | |
| 20 | 20 | ]; | 
| 21 | 21 | |
| 22 | 22 | /** | 
| @@ -65,10 +65,10 @@ discard block | ||
| 65 | 65 | |
| 66 | 66 | // Set a default description | 
| 67 | 67 | $this->setDescription(_t( | 
| 68 | - __CLASS__ . '.DESCRIPTION', | |
| 68 | + __CLASS__.'.DESCRIPTION', | |
| 69 | 69 |              'Connect to a data source from {site}. Once added and saved you can configure the appearance and add search' | 
| 70 | 70 | . ' filters.', | 
| 71 | - [ 'site' => $this->getSiteName() ] | |
| 71 | + ['site' => $this->getSiteName()] | |
| 72 | 72 | )); | 
| 73 | 73 | } | 
| 74 | 74 | |
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 |          $resource = $dataObject->{$this->name}; | 
| 142 | 142 | |
| 143 | 143 |          if (!$resource || !$resource instanceof DataObjectInterface) { | 
| 144 | -            throw new InvalidArgumentException('Could not determine where to save the value of ' . __CLASS__); | |
| 144 | +            throw new InvalidArgumentException('Could not determine where to save the value of '.__CLASS__); | |
| 145 | 145 | } | 
| 146 | 146 | |
| 147 | 147 | // Pull the value that'll be null or an associative array of our specification | 
| @@ -188,7 +188,7 @@ discard block | ||
| 188 | 188 |      { | 
| 189 | 189 | // Allow empty site names | 
| 190 | 190 |          if ($this->siteName === null) { | 
| 191 | - return _t(__CLASS__ . '.GENERIC_SITE_NAME', 'a CKAN website'); | |
| 191 | + return _t(__CLASS__.'.GENERIC_SITE_NAME', 'a CKAN website'); | |
| 192 | 192 | } | 
| 193 | 193 | |
| 194 | 194 | return $this->siteName; | 
| @@ -53,7 +53,7 @@ | ||
| 53 | 53 | } | 
| 54 | 54 | |
| 55 | 55 | $update = SQLUpdate::create( | 
| 56 | - '"' . $record->baseTable() . '"', | |
| 56 | + '"'.$record->baseTable().'"', | |
| 57 | 57 | [], | 
| 58 | 58 | $where + ['"ID" != ?' => $record->ID, '"ResourceID"' => $resource->ID] | 
| 59 | 59 | ); | 
| @@ -25,11 +25,11 @@ discard block | ||
| 25 | 25 | |
| 26 | 26 | public function getCMSFields() | 
| 27 | 27 |      { | 
| 28 | -        $this->beforeUpdateCMSFields(function (FieldList $fields) { | |
| 28 | +        $this->beforeUpdateCMSFields(function(FieldList $fields) { | |
| 29 | 29 |              $fields->addFieldToTab('Root.Main', PresentedOptionsField::create( | 
| 30 | 30 | 'Options', | 
| 31 | 31 | $this->FilterFor, | 
| 32 | - _t(__CLASS__ . '.OPTIONS', 'Presented options') | |
| 32 | + _t(__CLASS__.'.OPTIONS', 'Presented options') | |
| 33 | 33 | )); | 
| 34 | 34 | }); | 
| 35 | 35 | |
| @@ -71,6 +71,6 @@ discard block | ||
| 71 | 71 | return $spec['customOptions']; | 
| 72 | 72 | } | 
| 73 | 73 | |
| 74 | -        throw new InvalidArgumentException('Unknown "selectType" is configured for ' . static::class); | |
| 74 | +        throw new InvalidArgumentException('Unknown "selectType" is configured for '.static::class); | |
| 75 | 75 | } | 
| 76 | 76 | } |