Completed
Push — master ( 11cb95...cdb331 )
by Vítězslav
39:32 queued 14:14
created

Root::uploadCertificate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * FlexiPeeHP - / related functions.
5
 *
6
 * @author     Vítězslav Dvořák <[email protected]>
7
 * @copyright  (C) 2015-2017 Spoje.Net
8
 */
9
10
namespace FlexiPeeHP;
11
12
/**
13
 * Description of Common
14
 *
15
 * @author vitex
16
 */
17
class Root extends FlexiBeeRW {
18
19
    /**
20
     * Update HTTPS certificate
21
     * 
22
     * @param string $pem
23
     * 
24
     * @return boolean
25
     */
26
    public function uploadCertificate($pem) {
27
        $this->postFields = $pem;
28
        $this->performRequest('/certificate', 'PUT');
29
        return $this->lastResponseCode == 201;
30
    }
31
32
    /**
33
     * Get availble companies listing
34
     * 
35
     * @param array $condition applay to listing
0 ignored issues
show
Documentation introduced by
There is no parameter named $condition. Did you maybe mean $conditions?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
36
     * 
37
     * @return array
38
     */
39
    public function companies($conditions = []) {
40
        return $this->getFlexiData('/c', $conditions);
41
    }
42
43
}
44