@@ -33,7 +33,7 @@ |
||
33 | 33 | 'type' => 'db', |
34 | 34 | 'info' => array( |
35 | 35 | 'type' => 'table', |
36 | - 'table_name' => $GLOBALS['wpdb']->{$this->wpdb_table_name}, |
|
36 | + 'table_name' => $GLOBALS[ 'wpdb' ]->{$this->wpdb_table_name}, |
|
37 | 37 | ), |
38 | 38 | ); |
39 | 39 | } |
@@ -92,7 +92,7 @@ |
||
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
95 | - $this->switched[] = $switched; |
|
95 | + $this->switched[ ] = $switched; |
|
96 | 96 | |
97 | 97 | return true; |
98 | 98 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $depth = count( $hierarchy ); |
52 | 52 | |
53 | 53 | if ( 1 === $depth ) { |
54 | - $class_hierarchies[] = array(); |
|
54 | + $class_hierarchies[ ] = array(); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | if ( is_array( $entity_id ) ) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | // If a user isn't allowed to even know about an entity, they can't do |
73 | 73 | // anything else either. So we always check that too. |
74 | 74 | if ( 'know' !== $type ) { |
75 | - $types[] = 'know'; |
|
75 | + $types[ ] = 'know'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | foreach ( $types as $type ) { |
@@ -94,8 +94,8 @@ |
||
94 | 94 | $entity = clone $this->entity_object; |
95 | 95 | |
96 | 96 | if ( $entity->set_the_value( $value ) ) { |
97 | - $this->the_entities[] = $entity; |
|
98 | - $this->the_value[] = $entity->get_the_id(); |
|
97 | + $this->the_entities[ ] = $entity; |
|
98 | + $this->the_value[ ] = $entity->get_the_id(); |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'type' => 'db', |
54 | 54 | 'info' => array( |
55 | 55 | 'type' => 'table', |
56 | - 'table_name' => $GLOBALS['wpdb']->usermeta, |
|
56 | + 'table_name' => $GLOBALS[ 'wpdb' ]->usermeta, |
|
57 | 57 | 'primary_id_field' => 'user_id', |
58 | 58 | 'related_id_field' => array( |
59 | 59 | 'type' => 'serialized_array', |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | 'conditions' => array( |
63 | 63 | array( |
64 | 64 | 'field' => 'meta_key', |
65 | - 'value' => $GLOBALS['wpdb']->get_blog_prefix() . 'capabilities', |
|
65 | + 'value' => $GLOBALS[ 'wpdb' ]->get_blog_prefix() . 'capabilities', |
|
66 | 66 | ), |
67 | 67 | ), |
68 | 68 | ), |
@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | |
24 | 24 | $parts = wordpoints_parse_dynamic_slug( $this->slug ); |
25 | 25 | |
26 | - if ( $parts['dynamic'] ) { |
|
26 | + if ( $parts[ 'dynamic' ] ) { |
|
27 | 27 | |
28 | 28 | $parsed = $this->parse_slug( $this->related_entity_slug ); |
29 | 29 | |
30 | - $this->primary_entity_slug = "{$this->primary_entity_slug}\\{$parts['dynamic']}"; |
|
31 | - $this->related_entity_slug = "{$parsed['slug']}\\{$parts['dynamic']}"; |
|
30 | + $this->primary_entity_slug = "{$this->primary_entity_slug}\\{$parts[ 'dynamic' ]}"; |
|
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 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 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 | 48 | if ( $entity instanceof WordPoints_Entity ) { |
49 | 49 | return $entity->get_title(); |
@@ -129,7 +129,7 @@ |
||
129 | 129 | 'type' => 'db', |
130 | 130 | 'info' => array( |
131 | 131 | 'type' => 'meta_table', |
132 | - 'table_name' => $GLOBALS['wpdb']->{$this->wpdb_table_name}, |
|
132 | + 'table_name' => $GLOBALS[ 'wpdb' ]->{$this->wpdb_table_name}, |
|
133 | 133 | 'meta_key' => $this->meta_key, |
134 | 134 | 'meta_key_field' => $this->meta_key_field, |
135 | 135 | 'meta_value_field' => $this->meta_value_field, |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | foreach ( $restrictions as $restriction ) { |
66 | 66 | if ( $restriction->applies() ) { |
67 | - $this->restrictions[] = $restriction; |
|
67 | + $this->restrictions[ ] = $restriction; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * @since 2.2.0 |
32 | 32 | */ |
33 | 33 | public function __construct( $entity_id, array $hierarchy ) { |
34 | - $this->is_registered = wordpoints_entities()->is_registered( $hierarchy[0] ); |
|
34 | + $this->is_registered = wordpoints_entities()->is_registered( $hierarchy[ 0 ] ); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |