Passed
Pull Request — 4 (#200)
by
unknown
02:50
created
src/Task/SlideLinkTask.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
                 $slideLink = $this->findOrMakeLink($linkID, $linkLabel);
60 60
 
61
-                if ($slideLink !== false && $slideLink instanceof Link) {
61
+                if ($slideLink!==false && $slideLink instanceof Link) {
62 62
                     DB::prepared_query(
63 63
                         "UPDATE \"{$table}\" SET \"SlideLinkID\" = ? WHERE \"ID\" = ?",
64 64
                         [$slideLink->ID, $record['ID']]
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $link->SiteTreeID = $linkID;
101 101
         $link->Template = 'button';
102 102
 
103
-        if ($linkLabel !== null && $linkLabel !== '') {
103
+        if ($linkLabel!==null && $linkLabel!=='') {
104 104
             $link->Title = $linkLabel;
105 105
         } else {
106 106
             $link->Title = $page->Title;
Please login to merge, or discard this patch.
src/Task/SlideThumbnailNavMigrationTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
                 }
90 90
             }
91 91
         }
92
-        static::write_message($ct . " Sliders updated");
92
+        static::write_message($ct." Sliders updated");
93 93
     }
94 94
 
95 95
     /**
Please login to merge, or discard this patch.
src/Model/SlideImage.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -138,13 +138,13 @@  discard block
 block discarded – undo
138 138
     {
139 139
         $labels = parent::fieldLabels($includerelations);
140 140
 
141
-        $labels['Name'] = _t(__CLASS__ . '.NAME', 'Name');
142
-        $labels['Headline'] = _t(__CLASS__ . '.HEADLINE', 'Headline');
143
-        $labels['Description'] = _t(__CLASS__ . '.DESCRIPTION', 'Description');
144
-        $labels['SlideLinkID'] =  _t(__CLASS__ . '.PAGE_LINK', "Call to action link");
145
-        $labels['Image'] = _t(__CLASS__ . '.IMAGE', 'Image');
146
-        $labels['SlideType'] = _t(__CLASS__ . '.SlideType', 'Image or Video');
147
-        $labels['Video'] = _t(__CLASS__ . '.VideoLabel', 'Video URL');
141
+        $labels['Name'] = _t(__CLASS__.'.NAME', 'Name');
142
+        $labels['Headline'] = _t(__CLASS__.'.HEADLINE', 'Headline');
143
+        $labels['Description'] = _t(__CLASS__.'.DESCRIPTION', 'Description');
144
+        $labels['SlideLinkID'] = _t(__CLASS__.'.PAGE_LINK', "Call to action link");
145
+        $labels['Image'] = _t(__CLASS__.'.IMAGE', 'Image');
146
+        $labels['SlideType'] = _t(__CLASS__.'.SlideType', 'Image or Video');
147
+        $labels['Video'] = _t(__CLASS__.'.VideoLabel', 'Video URL');
148 148
 
149 149
         return $labels;
150 150
     }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function getCMSFields()
156 156
     {
157
-        $this->beforeUpdateCMSFields(function ($fields) {
157
+        $this->beforeUpdateCMSFields(function($fields) {
158 158
             $fields->removeByName([
159 159
                 'ShowSlide',
160 160
                 'SortOrder',
@@ -169,19 +169,19 @@  discard block
 block discarded – undo
169 169
             // Name
170 170
             $fields->dataFieldByName('Name')
171 171
                 ->setDescription(
172
-                    _t(__CLASS__ . '.INTERNAL_USE', 'for internal reference only')
172
+                    _t(__CLASS__.'.INTERNAL_USE', 'for internal reference only')
173 173
                 );
174 174
 
175 175
             // Headline
176 176
             $fields->dataFieldByName('Headline')
177 177
                 ->setDescription(
178
-                    _t(__CLASS__ . '.USED_IN_TEMPLATE', 'optional, used in template')
178
+                    _t(__CLASS__.'.USED_IN_TEMPLATE', 'optional, used in template')
179 179
                 );
180 180
 
181 181
             // Description
182 182
             $fields->dataFieldByName('Description')
183 183
                 ->setDescription(
184
-                    _t(__CLASS__ . '.USED_IN_TEMPLATE', 'optional, used in template')
184
+                    _t(__CLASS__.'.USED_IN_TEMPLATE', 'optional, used in template')
185 185
                 );
186 186
 
187 187
             // Page link
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                     )->displayIf('SlideType')->isEqualTo('Image')->orIf('SlideType')->isEqualTo('Video')->end(),
207 207
                     Wrapper::create(
208 208
                         $videoField = EmbeddedObjectField::create('Video', $this->fieldLabel('Video'))
209
-                            ->setDescription(_t(__CLASS__ . '.VideoDescription', 'Supported links: YouTube, Vimeo'))
209
+                            ->setDescription(_t(__CLASS__.'.VideoDescription', 'Supported links: YouTube, Vimeo'))
210 210
                     )->displayIf('SlideType')->isEqualTo('Video')->end()
211 211
                 ))->setName('MediaFields'),
212 212
                 'Description'
@@ -229,27 +229,27 @@  discard block
 block discarded – undo
229 229
 
230 230
         if (!$this->Name) {
231 231
             $result->addError(
232
-                _t(__CLASS__ . '.NAME_REQUIRED', 'A Name is required before you can save')
232
+                _t(__CLASS__.'.NAME_REQUIRED', 'A Name is required before you can save')
233 233
             );
234 234
         }
235 235
 
236 236
         $types = $this->getTypeSource();
237 237
 
238
-        if (isset($types['Video']) && $this->SlideType == 'Video' && !$this->VideoID) {
238
+        if (isset($types['Video']) && $this->SlideType=='Video' && !$this->VideoID) {
239 239
             $result->addError(
240
-                _t(__CLASS__ . '.VIDEO_REQUIRED', 'An Video Link is required before you can save')
240
+                _t(__CLASS__.'.VIDEO_REQUIRED', 'An Video Link is required before you can save')
241 241
             );
242 242
         }
243 243
 
244
-        if (isset($types['Image']) && $this->SlideType == 'Image' && !$this->ImageID) {
244
+        if (isset($types['Image']) && $this->SlideType=='Image' && !$this->ImageID) {
245 245
             $result->addError(
246
-                _t(__CLASS__ . '.IMAGE_REQUIRED', 'An Image is required before you can save')
246
+                _t(__CLASS__.'.IMAGE_REQUIRED', 'An Image is required before you can save')
247 247
             );
248 248
         }
249 249
 
250
-        if (isset($types['Text']) && $this->SlideType == 'Text' && !$this->Description) {
250
+        if (isset($types['Text']) && $this->SlideType=='Text' && !$this->Description) {
251 251
             $result->addError(
252
-                _t(__CLASS__ . '.DESCRIPTION_REQUIRED', 'A Description is required before you can save')
252
+                _t(__CLASS__.'.DESCRIPTION_REQUIRED', 'A Description is required before you can save')
253 253
             );
254 254
         }
255 255
 
@@ -329,9 +329,9 @@  discard block
 block discarded – undo
329 329
      */
330 330
     public function renderWith($template = null, $customFields = null)
331 331
     {
332
-        if ($template === null) {
332
+        if ($template===null) {
333 333
             $template = static::class;
334
-            $template = ($this->SlideType) ? $template . "_{$this->SlideType}" : '';
334
+            $template = ($this->SlideType) ? $template."_{$this->SlideType}" : '';
335 335
         }
336 336
 
337 337
         return parent::renderWith($template);
Please login to merge, or discard this patch.
src/ORM/FlexSlider.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -108,63 +108,63 @@  discard block
 block discarded – undo
108 108
             ]);
109 109
             $SlidesField = GridField::create(
110 110
                 'Slides',
111
-                _t(__CLASS__ . '.SLIDES', 'Slides'),
111
+                _t(__CLASS__.'.SLIDES', 'Slides'),
112 112
                 $this->owner->Slides()->sort('SortOrder'),
113 113
                 $config
114 114
             );
115 115
 
116
-            $slideTitle = $this->owner->stat('slide_tab_title') ?: _t(__CLASS__ . '.SLIDES', 'Slides');
116
+            $slideTitle = $this->owner->stat('slide_tab_title') ?: _t(__CLASS__.'.SLIDES', 'Slides');
117 117
 
118 118
             $animations = [];
119 119
             $animationOptions = $this->owner->dbObject('Animation')->getEnum();
120 120
             foreach ($animationOptions as $value) {
121
-                $animations[$value] = _t(__CLASS__ . ".$value", $value);
121
+                $animations[$value] = _t(__CLASS__.".$value", $value);
122 122
             }
123 123
 
124 124
             $fields->addFieldsToTab("Root.{$slideTitle}", [
125 125
                 $SlidesField,
126
-                ToggleCompositeField::create('ConfigHD', _t(__CLASS__ . '.SettingsLabel', 'Slider Settings'), [
126
+                ToggleCompositeField::create('ConfigHD', _t(__CLASS__.'.SettingsLabel', 'Slider Settings'), [
127 127
                     DropdownField::create(
128 128
                         'Animation',
129
-                        _t(__CLASS__ . '.ANIMATION_OPTION', 'Animation option'),
129
+                        _t(__CLASS__.'.ANIMATION_OPTION', 'Animation option'),
130 130
                         $animations
131 131
                     ),
132 132
                     CheckboxField::create(
133 133
                         'Animate',
134
-                        _t(__CLASS__ . '.ANIMATE', 'Animate automatically')
134
+                        _t(__CLASS__.'.ANIMATE', 'Animate automatically')
135 135
                     ),
136 136
                     CheckboxField::create(
137 137
                         'Loop',
138
-                        _t(__CLASS__ . '.LOOP', 'Loop the carousel')
138
+                        _t(__CLASS__.'.LOOP', 'Loop the carousel')
139 139
                     ),
140 140
                     CheckboxField::create(
141 141
                         'SliderControlNav',
142
-                        _t(__CLASS__ . '.CONTROL_NAV', 'Show ControlNav')
142
+                        _t(__CLASS__.'.CONTROL_NAV', 'Show ControlNav')
143 143
                     ),
144 144
                     CheckboxField::create(
145 145
                         'SliderDirectionNav',
146
-                        _t(__CLASS__ . '.DIRECTION_NAV', 'Show DirectionNav')
146
+                        _t(__CLASS__.'.DIRECTION_NAV', 'Show DirectionNav')
147 147
                     ),
148 148
                     CheckboxField::create(
149 149
                         'ThumbnailNav',
150
-                        _t(__CLASS__ . '.THUMBNAIL_NAV', 'Thumbnail Navigation')
150
+                        _t(__CLASS__.'.THUMBNAIL_NAV', 'Thumbnail Navigation')
151 151
                     ),
152 152
                     //DisplayLogicWrapper::create(
153 153
                     CheckboxField::create(
154 154
                         'CarouselControlNav',
155
-                        _t(__CLASS__ . '.CAROUSEL_CONTROL_NAV', 'Show Carousel ControlNav')
155
+                        _t(__CLASS__.'.CAROUSEL_CONTROL_NAV', 'Show Carousel ControlNav')
156 156
                     ),
157 157
                     CheckboxField::create(
158 158
                         'CarouselDirectionNav',
159
-                        _t(__CLASS__ . '.CAROUSEL_DIRECTION_NAV', 'Show Carousel DirectionNav')
159
+                        _t(__CLASS__.'.CAROUSEL_DIRECTION_NAV', 'Show Carousel DirectionNav')
160 160
                     ),
161 161
                     NumericField::create(
162 162
                         'CarouselThumbnailCt',
163
-                        _t(__CLASS__ . '.CAROUSEL_THUMBNAIL_COUNT', 'Number of thumbnails')
163
+                        _t(__CLASS__.'.CAROUSEL_THUMBNAIL_COUNT', 'Number of thumbnails')
164 164
                     ),
165 165
                     NumericField::create(
166 166
                         'FlexSliderSpeed',
167
-                        _t(__CLASS__ . '.SLIDER_SPEED', 'Slider Speed')
167
+                        _t(__CLASS__.'.SLIDER_SPEED', 'Slider Speed')
168 168
                     )
169 169
                         ->setDescription('In Seconds')
170 170
                         ->setScale(2),
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         }
212 212
 
213 213
         // Flexslider options
214
-        $sync = ($this->owner->ThumbnailNav == true) ? "sync: '.fs-carousel:eq('+index+')'," : '';
214
+        $sync = ($this->owner->ThumbnailNav==true) ? "sync: '.fs-carousel:eq('+index+')'," : '';
215 215
 
216 216
         $before = $this->owner->hasMethod('flexSliderBeforeAction')
217 217
             ? $this->owner->flexSliderBeforeAction()
@@ -230,18 +230,18 @@  discard block
 block discarded – undo
230 230
 
231 231
                          if(jQuery('.fs-carousel').eq(index).length) {
232 232
                              jQuery('.fs-carousel').eq(index).flexslider({
233
-                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean() . ",
233
+                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean().",
234 234
                                 animation: 'slide',
235
-                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean() . ",
236
-                                controlNav: " . $this->owner->obj('CarouselControlNav')->NiceAsBoolean() . ",
237
-                                directionNav: " . $this->owner->obj('CarouselDirectionNav')->NiceAsBoolean() . ",
235
+                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean().",
236
+                                controlNav: " . $this->owner->obj('CarouselControlNav')->NiceAsBoolean().",
237
+                                directionNav: " . $this->owner->obj('CarouselDirectionNav')->NiceAsBoolean().",
238 238
                                 prevText: '',
239 239
                                 nextText: '',
240 240
                                 pausePlay: false,
241 241
                                 asNavFor: '.flexslider:eq('+index+')',
242
-                                minItems: " . $this->owner->obj('CarouselThumbnailCt') . ",
243
-                                maxItems: " . $this->owner->obj('CarouselThumbnailCt') . ",
244
-                                move: " . $this->owner->obj('CarouselThumbnailCt') . ",
242
+                                minItems: " . $this->owner->obj('CarouselThumbnailCt').",
243
+                                maxItems: " . $this->owner->obj('CarouselThumbnailCt').",
244
+                                move: " . $this->owner->obj('CarouselThumbnailCt').",
245 245
                                 itemWidth: 100,
246 246
                                 itemMargin: 10
247 247
                               });
@@ -249,22 +249,22 @@  discard block
 block discarded – undo
249 249
 
250 250
                         if(jQuery('.flexslider').eq(index).length){
251 251
                             jQuery('.flexslider').eq(index).flexslider({
252
-                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean() . ",
253
-                                animation: '" . $this->owner->Animation . "',
254
-                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean() . ",
255
-                                controlNav: " . $this->owner->obj('SliderControlNav')->NiceAsBoolean() . ",
256
-                                directionNav: " . $this->owner->obj('SliderDirectionNav')->NiceAsBoolean() . ",
252
+                                slideshow: " . $this->owner->obj('Animate')->NiceAsBoolean().",
253
+                                animation: '" . $this->owner->Animation."',
254
+                                animationLoop: " . $this->owner->obj('Loop')->NiceAsBoolean().",
255
+                                controlNav: " . $this->owner->obj('SliderControlNav')->NiceAsBoolean().",
256
+                                directionNav: " . $this->owner->obj('SliderDirectionNav')->NiceAsBoolean().",
257 257
                                 prevText: '',
258 258
                                 nextText: '',
259 259
                                 pauseOnAction: true,
260 260
                                 pauseOnHover: true,
261
-                                " . $sync . "
261
+                                " . $sync."
262 262
                                 start: function(slider){
263 263
                                   $('body').removeClass('loading');
264 264
                                 },
265
-                                before: " . $before . ',
266
-                                after: ' . $after . ',
267
-                                slideshowSpeed: ' . $speed . '
265
+                                before: " . $before.',
266
+                                after: ' . $after.',
267
+                                slideshowSpeed: ' . $speed.'
268 268
                             });
269 269
                         }
270 270
                     })
Please login to merge, or discard this patch.