Completed
Push — master ( 144c08...e73d65 )
by J.D.
02:53
created
src/includes/classes/hook/event/comment/leave.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -24,23 +24,23 @@  discard block
 block discarded – undo
24 24
 	 */
25 25
 	public function get_title() {
26 26
 
27
-		$parsed = wordpoints_parse_dynamic_slug( $this->slug );
27
+		$parsed = wordpoints_parse_dynamic_slug($this->slug);
28 28
 
29
-		switch ( $parsed['dynamic'] ) {
29
+		switch ($parsed['dynamic']) {
30 30
 
31 31
 			case 'post':
32
-				return __( 'Comment on a Post', 'wordpoints' );
32
+				return __('Comment on a Post', 'wordpoints');
33 33
 
34 34
 			case 'page':
35
-				return __( 'Comment on a Page', 'wordpoints' );
35
+				return __('Comment on a Page', 'wordpoints');
36 36
 
37 37
 			case 'attachment':
38
-				return __( 'Comment on a Media Upload', 'wordpoints' );
38
+				return __('Comment on a Media Upload', 'wordpoints');
39 39
 
40 40
 			default:
41 41
 				return sprintf(
42 42
 					// translators: singular name of the post type
43
-					__( 'Comment on a %s', 'wordpoints' )
43
+					__('Comment on a %s', 'wordpoints')
44 44
 					, $this->get_entity_title()
45 45
 				);
46 46
 		}
@@ -51,23 +51,23 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function get_description() {
53 53
 
54
-		$parsed = wordpoints_parse_dynamic_slug( $this->slug );
54
+		$parsed = wordpoints_parse_dynamic_slug($this->slug);
55 55
 
56
-		switch ( $parsed['dynamic'] ) {
56
+		switch ($parsed['dynamic']) {
57 57
 
58 58
 			case 'post':
59
-				return __( 'When a user leaves a comment on a Post.', 'wordpoints' );
59
+				return __('When a user leaves a comment on a Post.', 'wordpoints');
60 60
 
61 61
 			case 'page':
62
-				return __( 'When a user leaves a comment on a Page.', 'wordpoints' );
62
+				return __('When a user leaves a comment on a Page.', 'wordpoints');
63 63
 
64 64
 			case 'attachment':
65
-				return __( 'When a user leaves a comment on a file uploaded to the Media Library.', 'wordpoints' );
65
+				return __('When a user leaves a comment on a file uploaded to the Media Library.', 'wordpoints');
66 66
 
67 67
 			default:
68 68
 				return sprintf(
69 69
 					// translators: singular name of the post type
70
-					__( 'When a user leaves a comment on a %s.', 'wordpoints' )
70
+					__('When a user leaves a comment on a %s.', 'wordpoints')
71 71
 					, $this->get_entity_title()
72 72
 				);
73 73
 		}
Please login to merge, or discard this patch.
src/includes/classes/entity/relationship/dynamic.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,20 +17,20 @@  discard block
 block discarded – undo
17 17
 	/**
18 18
 	 * @since 1.0.0
19 19
 	 */
20
-	public function __construct( $slug ) {
20
+	public function __construct($slug) {
21 21
 
22
-		parent::__construct( $slug );
22
+		parent::__construct($slug);
23 23
 
24
-		$parts = wordpoints_parse_dynamic_slug( $this->slug );
24
+		$parts = wordpoints_parse_dynamic_slug($this->slug);
25 25
 
26
-		if ( $parts['dynamic'] ) {
26
+		if ($parts['dynamic']) {
27 27
 
28
-			$parsed = $this->parse_slug( $this->related_entity_slug );
28
+			$parsed = $this->parse_slug($this->related_entity_slug);
29 29
 
30 30
 			$this->primary_entity_slug = "{$this->primary_entity_slug}\\{$parts['dynamic']}";
31 31
 			$this->related_entity_slug = "{$parsed['slug']}\\{$parts['dynamic']}";
32 32
 
33
-			if ( $parsed['is_array'] ) {
33
+			if ($parsed['is_array']) {
34 34
 				$this->related_entity_slug .= '{}';
35 35
 			}
36 36
 		}
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	public function get_title() {
43 43
 
44
-		$parsed = $this->parse_slug( $this->related_entity_slug );
44
+		$parsed = $this->parse_slug($this->related_entity_slug);
45 45
 
46
-		$entity = wordpoints_entities()->get( $parsed['slug'] );
46
+		$entity = wordpoints_entities()->get($parsed['slug']);
47 47
 
48
-		if ( $entity instanceof WordPoints_Entity ) {
48
+		if ($entity instanceof WordPoints_Entity) {
49 49
 			return $entity->get_title();
50 50
 		} else {
51 51
 			return $this->related_entity_slug;
Please login to merge, or discard this patch.
src/admin/includes/actions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@
 block discarded – undo
7 7
  * @since 1.0.0
8 8
  */
9 9
 
10
-add_action( 'wordpoints_init_app-apps', 'wordpoints_hooks_register_admin_apps' );
10
+add_action('wordpoints_init_app-apps', 'wordpoints_hooks_register_admin_apps');
11 11
 
12
-add_action( 'admin_menu', 'wordpoints_hooks_api_admin_menu' );
12
+add_action('admin_menu', 'wordpoints_hooks_api_admin_menu');
13 13
 
14
-if ( is_wordpoints_network_active() ) {
15
-	add_action( 'network_admin_menu', 'wordpoints_hooks_api_admin_menu' );
14
+if (is_wordpoints_network_active()) {
15
+	add_action('network_admin_menu', 'wordpoints_hooks_api_admin_menu');
16 16
 }
17 17
 
18
-add_action( 'admin_init', 'wordpoints_hooks_admin_register_scripts' );
19
-add_action( 'admin_init', 'wordpoints_hooks_admin_ajax' );
18
+add_action('admin_init', 'wordpoints_hooks_admin_register_scripts');
19
+add_action('admin_init', 'wordpoints_hooks_admin_ajax');
20 20
 
21
-add_filter( 'script_loader_tag', 'wordpoints_script_templates_filter', 10, 2 );
21
+add_filter('script_loader_tag', 'wordpoints_script_templates_filter', 10, 2);
22 22
 
23 23
 // EOF
Please login to merge, or discard this patch.
src/admin/includes/classes/screen.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 	public function hooks() {
63 63
 
64 64
 		/* Load the JavaScript needed for the settings screen. */
65
-		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
66
-		add_action( "admin_footer-{$this->id}", array( $this, 'footer_scripts' ) );
65
+		add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
66
+		add_action("admin_footer-{$this->id}", array($this, 'footer_scripts'));
67 67
 	}
68 68
 
69 69
 	/**
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
 
99 99
 		<div class="wrap">
100 100
 
101
-			<h1><?php echo esc_html( $this->get_title() ); ?></h1>
101
+			<h1><?php echo esc_html($this->get_title()); ?></h1>
102 102
 
103 103
 			<?php settings_errors(); ?>
104 104
 
105
-			<?php if ( ! empty( $this->tabs ) ) : ?>
106
-				<?php wordpoints_admin_show_tabs( $this->tabs, false ); ?>
105
+			<?php if ( ! empty($this->tabs)) : ?>
106
+				<?php wordpoints_admin_show_tabs($this->tabs, false); ?>
107 107
 			<?php endif; ?>
108 108
 
109 109
 			<?php $this->display_content(); ?>
Please login to merge, or discard this patch.
src/admin/includes/classes/screens.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @since 1.0.0
28 28
 	 */
29 29
 	public function __construct() {
30
-		add_action( 'current_screen', array( $this, 'set_current_screen' ) );
30
+		add_action('current_screen', array($this, 'set_current_screen'));
31 31
 	}
32 32
 
33 33
 	/**
@@ -37,23 +37,23 @@  discard block
 block discarded – undo
37 37
 	 *
38 38
 	 * @param WP_Screen $current_screen The WP_Screen object for the current screen.
39 39
 	 */
40
-	public function set_current_screen( $current_screen ) {
40
+	public function set_current_screen($current_screen) {
41 41
 
42 42
 		$screen_id = $current_screen->id;
43 43
 
44
-		if ( is_network_admin() ) {
45
-			$screen_id = substr( $screen_id, 0, -8 /* -network */ );
44
+		if (is_network_admin()) {
45
+			$screen_id = substr($screen_id, 0, -8 /* -network */);
46 46
 		}
47 47
 
48
-		$screen = $this->get( $screen_id );
48
+		$screen = $this->get($screen_id);
49 49
 
50
-		if ( ! ( $screen instanceof WordPoints_Admin_Screen ) ) {
50
+		if ( ! ($screen instanceof WordPoints_Admin_Screen)) {
51 51
 			return;
52 52
 		}
53 53
 
54 54
 		$this->current_screen = $screen;
55 55
 
56
-		add_action( "load-{$screen_id}", array( $this->current_screen, 'load' ) );
56
+		add_action("load-{$screen_id}", array($this->current_screen, 'load'));
57 57
 	}
58 58
 
59 59
 	/**
Please login to merge, or discard this patch.
src/includes/classes/entity/context/network.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	 */
22 22
 	public function get_current_id() {
23 23
 
24
-		if ( ! is_multisite() ) {
24
+		if ( ! is_multisite()) {
25 25
 			return 1;
26 26
 		}
27 27
 
Please login to merge, or discard this patch.
src/includes/classes/entity/context.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	/**
27 27
 	 * @since 1.0.0
28 28
 	 */
29
-	public function __construct( $slug ) {
29
+	public function __construct($slug) {
30 30
 
31 31
 		$this->slug = $slug;
32 32
 	}
Please login to merge, or discard this patch.
src/includes/classes/entity/context/site.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@
 block discarded – undo
21 21
 	 */
22 22
 	public function get_current_id() {
23 23
 
24
-		if ( ! is_multisite() ) {
24
+		if ( ! is_multisite()) {
25 25
 			return 1;
26 26
 		}
27 27
 
28
-		if ( wordpoints_is_network_context() ) {
28
+		if (wordpoints_is_network_context()) {
29 29
 			return false;
30 30
 		}
31 31
 
Please login to merge, or discard this patch.
src/includes/classes/class/registry/childreni.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 *
47 47
 	 * @return object[] The child objects, indexed by slug.
48 48
 	 */
49
-	public function get_children( $parent_slug );
49
+	public function get_children($parent_slug);
50 50
 
51 51
 	/**
52 52
 	 * Get the slugs of all of the classes that are children of a certain parent.
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 *
58 58
 	 * @return string[] The child slugs.
59 59
 	 */
60
-	public function get_children_slugs( $parent_slug );
60
+	public function get_children_slugs($parent_slug);
61 61
 
62 62
 	/**
63 63
 	 * Get an object by its slug.
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 *
70 70
 	 * @return object|false The object or false on failure.
71 71
 	 */
72
-	public function get( $parent_slug, $slug );
72
+	public function get($parent_slug, $slug);
73 73
 
74 74
 	/**
75 75
 	 * Register a type of object.
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @return bool Whether the class was registered successfully.
85 85
 	 */
86
-	public function register( $parent_slug, $slug, $class, array $args = array() );
86
+	public function register($parent_slug, $slug, $class, array $args = array());
87 87
 
88 88
 	/**
89 89
 	 * Deregister a type of object.
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @param string $parent_slug The group slug.
94 94
 	 * @param string $slug        The slug of the class to deregister.
95 95
 	 */
96
-	public function deregister( $parent_slug, $slug );
96
+	public function deregister($parent_slug, $slug);
97 97
 
98 98
 	/**
99 99
 	 * Deregister all children of a particular parent.
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 *
103 103
 	 * @param string $parent_slug The group slug.
104 104
 	 */
105
-	public function deregister_children( $parent_slug );
105
+	public function deregister_children($parent_slug);
106 106
 
107 107
 	/**
108 108
 	 * Check if a type of object is registered by its slug.
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 *
118 118
 	 * @return bool Whether the class is registered.
119 119
 	 */
120
-	public function is_registered( $parent_slug, $slug = null );
120
+	public function is_registered($parent_slug, $slug = null);
121 121
 }
122 122
 
123 123
 // EOF
Please login to merge, or discard this patch.