Completed
Push — master ( b8acd8...13d185 )
by Maciej
14:05
created

Post::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Created by Maciej Paprocki for Bureau-VA.
4
 * Date: 17/02/2016
5
 * Project Name: MaciekPaprocki\WordpressGuzzle
6
 * Time: 12:17
7
 */
8
9
namespace BureauVa\WordpressGuzzle\Repository;
10
11
12
/**
13
 * Class Post
14
 * @package MaciekPaprocki\WordpressGuzzle
15
 */
16
17
class Post extends RepositoryAbstract
18
{
19
    const PATH = 'posts';
20
21
    /**
22
     * finds Multiple posts by array of ids
23
     * @param $id
24
     * @return null
25
     */
26
    public function findByIds($ids)
27
    {
28
29
        return $this->createPromise(self::PATH, ['post__in' => $ids]);
30
    }
31
32
    /**
33
     * finds post by id
34
     * @param $id
35
     * @return null
36
     */
37
    public function findOneById($id)
38
    {
39
40
41
        return $this->createPromise(self::PATH . '/' . $id);
42
    }
43
}