Skip to content

Commit 9944b68

Browse files
committed
PHPCS fixes.
1 parent c06f2c7 commit 9944b68

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

itunes_rss.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ description: iTunes RSS
44
core: 8.x
55
package: Custom
66
dependencies:
7-
- views
7+
- drupal:views

itunes_rss.module

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
<?php
22

3+
/**
4+
* @file
5+
* Provides iTunes RSS feed via views.
6+
*/
7+
38
/**
49
* Implements hook_theme().
510
*/
611
function itunes_rss_theme() {
712
$theme_registry['views_view_itunes_rss'] = [
813
'variables' => [
9-
'view' => NULL,
10-
'options' => NULL,
11-
'rows' => NULL,
12-
'title' => NULL,
13-
],
14+
'view' => NULL,
15+
'options' => NULL,
16+
'rows' => NULL,
17+
'title' => NULL,
18+
],
1419
'path' => 'templates',
1520
'includes' => ['core/modules/views/views.theme.inc'],
1621
'template' => 'views-view-itunes-rss',
@@ -28,11 +33,10 @@ function itunes_rss_theme() {
2833
* - view: A ViewExecutable object.
2934
* - rows: The raw row data.
3035
*/
31-
function template_preprocess_views_view_itunes_rss(&$variables) {
36+
function template_preprocess_views_view_itunes_rss(array &$variables) {
3237
template_preprocess_views_view_rss($variables);
3338

34-
$view = $variables['view'];
35-
$items = $variables['rows'];
39+
$view = $variables['view'];
3640
$style = $view->style_plugin;
3741
$variables['image_url'] = $style->getImage();
3842
$variables['itunes_category'] = $style->options['category'];

src/Plugin/views/row/ItunesRssFields.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ public function render($row) {
144144
$item->elements[] = [
145145
'key' => 'enclosure',
146146
'attributes' => [
147-
// In RSS feeds, it is necessary to use absolute URLs. The 'url.site'
148-
// cache context is already associated with RSS feed responses, so it
149-
// does not need to be specified here.
147+
// In RSS feeds, it is necessary to use absolute URLs. The
148+
// 'url.site' cache context is already associated with RSS feed
149+
// responses, so it does not need to be specified here.
150150
'url' => file_create_url($file->getFileUri()),
151151
'length' => $file->getSize(),
152152
'type' => $file->getMimeType(),
153-
]
153+
],
154154
];
155155
}
156156
}
@@ -184,4 +184,5 @@ public function render($row) {
184184

185185
return $build;
186186
}
187+
187188
}

src/Plugin/views/style/ItunesRss.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Drupal\itunes_rss\Plugin\views\style;
44

55
use Drupal\Core\Form\FormStateInterface;
6-
use Drupal\Core\Url;
76
use Drupal\views\Plugin\views\style\Rss;
87

98
/**
@@ -142,4 +141,5 @@ public function render() {
142141

143142
return $build;
144143
}
144+
145145
}

0 commit comments

Comments
 (0)