public function createLabel(string $name)
    {
        if ('' === $name) {
            return false;
        }

        $data   = $this->prepareRequestData(['name' => $name]);
        $result = $this->post('labels', $data);

        if (200 === $result->getStatusCode()) {
            return json_decode($result->getBody()->getContents());
        }

        return false;
    }
public function createLabel(string $name)
    {
        if ('' === $name) {
            return false;
        }

        $data   = $this->prepareRequestData(['name' => $name]);
        $result = $this->post('labels', $data);

        if (200 === $result->getStatusCode()) {
            return json_decode($result->getBody()->getContents());
        }

        return false;
    }
public function createLabel ( string $ name ) { if ( '' === $ name ) { return false ; } $ data = $ this -> prepareRequestData ( [ 'name' => $ name ] ) ; $ result = $ this -> post ( 'labels' , $ data ) ; if ( 200 === $ result -> getStatusCode ( ) ) { return json_decode ( $ result -> getBody ( ) -> getContents ( ) ) ; } return false ; }
Create a new label.

@param string $name Name of the label.

@return object|bool Object with values of the new label, or false on failure.
Create a new label .