GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( d5badb...35381c )
by Christian
10s
created
widget.php 1 patch
Braces   +13 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
 
27 27
 	public function widget( $args, $instance ) {
28 28
 		// Fetch the (network)button by it's name
29
-		if ( ! $button = \PodloveSubscribeButton\Model\Button::get_button_by_name($instance['button']) )
30
-			return sprintf( __('Oops. There is no button with the ID "%s".', 'podlove-subscribe-button'), $args['button'] );
29
+		if ( ! $button = \PodloveSubscribeButton\Model\Button::get_button_by_name($instance['button']) ) {
30
+					return sprintf( __('Oops. There is no button with the ID "%s".', 'podlove-subscribe-button'), $args['button'] );
31
+		}
31 32
 
32 33
 		echo $args['before_widget'];
33 34
 		echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];
@@ -40,8 +41,9 @@  discard block
 block discarded – undo
40 41
 				\PodloveSubscribeButton::get_array_value_with_fallback($instance, 'color')
41 42
 			);
42 43
 		
43
-		if ( strlen($instance['infotext']) )
44
-			echo wpautop($instance['infotext']);
44
+		if ( strlen($instance['infotext']) ) {
45
+					echo wpautop($instance['infotext']);
46
+		}
45 47
 
46 48
 		echo $args['after_widget'];
47 49
 	}	
@@ -52,8 +54,9 @@  discard block
 block discarded – undo
52 54
 		}
53 55
 
54 56
 		$buttons = \PodloveSubscribeButton\Model\Button::all();
55
-		if ( is_multisite() )
56
-			$network_buttons = \PodloveSubscribeButton\Model\NetworkButton::all();
57
+		if ( is_multisite() ) {
58
+					$network_buttons = \PodloveSubscribeButton\Model\NetworkButton::all();
59
+		}
57 60
 
58 61
 		$buttons_as_options = function ($buttons) {
59 62
 			foreach ($buttons as $subscribebutton) {
@@ -86,8 +89,10 @@  discard block
 block discarded – undo
86 89
 					<optgroup label="<?php _e('Network', 'podlove-subscribe-button' ); ?>">
87 90
 						<?php $buttons_as_options($network_buttons); ?>
88 91
 					</optgroup>
89
-				<?php else : 
92
+				<?php else {
93
+	: 
90 94
 					$buttons_as_options($buttons);
95
+}
91 96
 				 endif; ?>
92 97
 			</select>
93 98
 
@@ -139,6 +144,6 @@  discard block
 block discarded – undo
139 144
 		return $instance;
140 145
 	}
141 146
 }
142
-add_action( 'widgets_init', function(){
147
+add_action( 'widgets_init', function() {
143 148
      register_widget( '\PodloveSubscribeButton\Podlove_Subscribe_Button_Widget' );
144 149
 });
145 150
\ No newline at end of file
Please login to merge, or discard this patch.