Issues (193)

src/Api/Endpoint/CheckoutEndpoint.php (1 issue)

1
<?php
2
namespace CodeCloud\Bundle\ShopifyBundle\Api\Endpoint;
3
4
use CodeCloud\Bundle\ShopifyBundle\Api\Request\GetJson;
5
6
class CheckoutEndpoint extends AbstractEndpoint
7
{
8
    /**
9
     * @param array $query
10
     * @return array|GenericEntity[]
11
     */
12
    public function findAll(array $query = array())
13
    {
14
        $request = new GetJson('/admin/checkouts.json', $query);
15
        $response = $this->sendPaged($request, 'checkouts');
16
        return $this->createCollection($response);
17
    }
18
19
    /**
20
     * @param array $query
21
     * @return int
22
     */
23
    public function countAll(array $query = array())
24
    {
25
        $request = new GetJson('/admin/checkouts/count.json', $query);
26
        $response = $this->send($request);
27
        return $response->get('count');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $response->get('count') also could return the type string which is incompatible with the documented return type integer.
Loading history...
28
    }
29
}
30