Skip to content

Commit 8ad2723

Browse files
committed
Documentation cleanup
1 parent 60ef3cd commit 8ad2723

9 files changed

+7
-34
lines changed

includes/data/connection/class-cart-item-connection-resolver.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class Cart_Item_Connection_Resolver extends AbstractConnectionResolver {
2929
const PREFIX = 'CI';
3030

3131
/**
32-
* get_loader_name
33-
*
3432
* Return the name of the loader to be used with the connection resolver
3533
*
3634
* @return string

includes/data/connection/class-coupon-connection-resolver.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ public function __construct( $source, $args, $context, $info ) {
5252
}
5353

5454
/**
55-
* get_loader_name
56-
*
5755
* Return the name of the loader to be used with the connection resolver
5856
*
5957
* @return string
@@ -65,7 +63,7 @@ public function get_loader_name() {
6563
/**
6664
* Given an ID, return the model for the entity or null
6765
*
68-
* @param $id
66+
* @param integer $id
6967
*
7068
* @return mixed|Coupon|null
7169
*/

includes/data/connection/class-customer-connection-resolver.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ class Customer_Connection_Resolver extends AbstractConnectionResolver {
2424
use WC_Connection_Functions;
2525

2626
/**
27-
* get_loader_name
28-
*
2927
* Return the name of the loader to be used with the connection resolver
3028
*
3129
* @return string

includes/data/connection/class-downloadable-item-connection-resolver.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ class Downloadable_Item_Connection_Resolver extends AbstractConnectionResolver {
3030
const PREFIX = 'DI';
3131

3232
/**
33-
* get_loader_name
34-
*
3533
* Return the name of the loader to be used with the connection resolver
3634
*
3735
* @return string
@@ -40,19 +38,6 @@ public function get_loader_name() {
4038
return 'downloadable_item';
4139
}
4240

43-
/**
44-
* Given an ID, return the model for the entity or null
45-
*
46-
* @param $id
47-
*
48-
* @return
49-
*
50-
* @throws \Exception
51-
*/
52-
public function get_node_by_id( $id ) {
53-
return $this->loader->load( $id );
54-
}
55-
5641
/**
5742
* Confirms if downloadable items should be retrieved.
5843
*
@@ -226,7 +211,7 @@ public function is_valid_offset( $offset ) {
226211
*
227212
* @return bool
228213
*/
229-
protected function is_valid_model( $model ) {
214+
protected function is_valid_model( array $model ) {
230215
return isset( $model ) && ! empty( $model['download_id'] );
231216
}
232217
}

includes/data/connection/class-order-connection-resolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function get_loader_name() {
6363
/**
6464
* Given an ID, return the model for the entity or null
6565
*
66-
* @param $id
66+
* @param integer $id
6767
*
6868
* @return mixed|Order|null
6969
*/

includes/data/connection/class-product-connection-resolver.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public function __construct( $source, $args, $context, $info ) {
6868
}
6969

7070
/**
71-
* get_loader_name
72-
*
7371
* Return the name of the loader to be used with the connection resolver
7472
*
7573
* @return string
@@ -81,9 +79,9 @@ public function get_loader_name() {
8179
/**
8280
* Given an ID, return the model for the entity or null
8381
*
84-
* @param $id
82+
* @param integer $id
8583
*
86-
* @return
84+
* @return Product|Product_Variation|null
8785
*
8886
* @throws \Exception
8987
*/

includes/data/connection/class-refund-connection-resolver.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ public function __construct( $source, $args, $context, $info ) {
5353
}
5454

5555
/**
56-
* get_loader_name
57-
*
5856
* Return the name of the loader to be used with the connection resolver
5957
*
6058
* @return string
@@ -66,7 +64,7 @@ public function get_loader_name() {
6664
/**
6765
* Given an ID, return the model for the entity or null
6866
*
69-
* @param $id
67+
* @param integer $id
7068
*
7169
* @return mixed|Refund|null
7270
*/

includes/data/connection/class-tax-rate-connection-resolver.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
*/
2222
class Tax_Rate_Connection_Resolver extends AbstractConnectionResolver {
2323
/**
24-
* get_loader_name
25-
*
2624
* Return the name of the loader to be used with the connection resolver
2725
*
2826
* @return string

includes/data/loader/class-wc-db-loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function loadKeys( array $keys ) {
7979
$loaded_items = array();
8080

8181
/**
82-
* Loop over the keys and return an array of cart items,
82+
* Loop over the keys and return an array of items.
8383
*/
8484
foreach ( $keys as $key ) {
8585
$loaded_items[ $key ] = call_user_func( $loader, $key );

0 commit comments

Comments
 (0)