Skip to content

Commit

Permalink
Merge branch 'feature/exception-class-case-typo' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lesstif committed Apr 12, 2016
2 parents fea1ec2 + eb27bac commit 7a81d5e
Show file tree
Hide file tree
Showing 21 changed files with 141 additions and 181 deletions.
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@

2. Next, run the Composer command to install the latest version of php jira rest client.
``` sh
php composer.phar require lesstif/php-jira-rest-client dev-master
php composer.phar require lesstif/php-jira-rest-client "~1.6"
```
or add the following to your composer.json file.
```json
{
"require": {
"lesstif/php-jira-rest-client": "dev-master"
"lesstif/php-jira-rest-client": "~1.6"
}
}
```
Expand Down Expand Up @@ -84,7 +84,7 @@ try {
} catch (JIRAException $e) {
print("Error Occured! " . $e->getMessage());
}
?>

````

## Get All Project list
Expand All @@ -108,7 +108,7 @@ try {
} catch (JIRAException $e) {
print("Error Occured! " . $e->getMessage());
}
?>

````

## Get Issue Info
Expand All @@ -128,7 +128,6 @@ try {
print("Error Occured! " . $e->getMessage());
}

?>
````

## Create Issue
Expand Down Expand Up @@ -160,7 +159,6 @@ try {
print("Error Occured! " . $e->getMessage());
}

?>
````

## Add Attachment
Expand All @@ -186,7 +184,6 @@ try {
$this->assertTrue(FALSE, "Attach Failed : " . $e->getMessage());
}

?>
````

## Update issue
Expand Down Expand Up @@ -221,7 +218,6 @@ try {
$this->assertTrue(FALSE, "update Failed : " . $e->getMessage());
}

?>
````

## Add comment
Expand Down Expand Up @@ -258,7 +254,6 @@ COMMENT;
$this->assertTrue(FALSE, "add Comment Failed : " . $e->getMessage());
}

?>
````

## Perform a transition on an issue
Expand All @@ -284,7 +279,6 @@ try {
$this->assertTrue(FALSE, "add Comment Failed : " . $e->getMessage());
}

?>
````

## Perform an advanced search
Expand All @@ -305,7 +299,7 @@ try {
} catch (JIRAException $e) {
$this->assertTrue(false, 'testSearch Failed : '.$e->getMessage());
}
?>

````

## Issue time tracking
Expand Down Expand Up @@ -337,7 +331,7 @@ try {
} catch (JIRAException $e) {
$this->assertTrue(false, 'testSearch Failed : '.$e->getMessage());
}
?>

````

## Issue worklog
Expand All @@ -359,7 +353,7 @@ try {
} catch (JIRAException $e) {
$this->assertTrue(false, 'testSearch Failed : '.$e->getMessage());
}
?>

````

# License
Expand Down
38 changes: 15 additions & 23 deletions src/Configuration/AbstractConfiguration.php
Original file line number Diff line number Diff line change
@@ -1,73 +1,65 @@
<?php
/**
* Created by PhpStorm.
* User: keanor
* Date: 17.08.15
* Time: 22:23
*/

namespace JiraRestApi\Configuration;

/**
* Class AbstractConfiguration
*
* @package JiraRestApi\Configuration
* Class AbstractConfiguration.
*/
abstract class AbstractConfiguration implements ConfigurationInterface
{
/**
* Jira host
* Jira host.
*
* @var string
*/
protected $jiraHost;

/**
* Jira login
* Jira login.
*
* @var string
*/
protected $jiraUser;

/**
* Jira password
* Jira password.
*
* @var string
*/
protected $jiraPassword;

/**
* Path to log file
* Path to log file.
*
* @var string
*/
protected $jiraLogFile;

/**
* Log level (DEBUG, INFO, ERROR, WARNING)
* Log level (DEBUG, INFO, ERROR, WARNING).
*
* @var string
*/
protected $jiraLogLevel;

/**
* Curl options CURLOPT_SSL_VERIFYHOST
* Curl options CURLOPT_SSL_VERIFYHOST.
*
* @var boolean
* @var bool
*/
protected $curlOptSslVerifyHost;

/**
* Curl options CURLOPT_SSL_VERIFYPEER
* Curl options CURLOPT_SSL_VERIFYPEER.
*
* @var boolean
* @var bool
*/
protected $curlOptSslVerifyPeer;

/**
* Curl options CURLOPT_VERBOSE
* Curl options CURLOPT_VERBOSE.
*
* @var boolean
* @var bool
*/
protected $curlOptVerbose;

Expand Down Expand Up @@ -112,23 +104,23 @@ public function getJiraLogLevel()
}

/**
* @return boolean
* @return bool
*/
public function isCurlOptSslVerifyHost()
{
return $this->curlOptSslVerifyHost;
}

/**
* @return boolean
* @return bool
*/
public function isCurlOptSslVerifyPeer()
{
return $this->curlOptSslVerifyPeer;
}

/**
* @return boolean
* @return bool
*/
public function isCurlOptVerbose()
{
Expand Down
8 changes: 3 additions & 5 deletions src/Configuration/ArrayConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
* Created by PhpStorm.
* User: keanor
* Date: 17.08.15
* Time: 22:40
* Time: 22:40.
*/

namespace JiraRestApi\Configuration;

/**
* Class ArrayConfiguration
*
* @package JiraRestApi\Configuration
* Class ArrayConfiguration.
*/
class ArrayConfiguration extends AbstractConfiguration
{
Expand All @@ -26,4 +24,4 @@ public function __construct(array $configuration)
}
}
}
}
}
31 changes: 15 additions & 16 deletions src/Configuration/ConfigurationInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,70 +3,69 @@
* Created by PhpStorm.
* User: keanor
* Date: 17.08.15
* Time: 21:58
* Time: 21:58.
*/

namespace JiraRestApi\Configuration;

/**
* Interface ConfigurationInterface
*
* @package JiraRestApi\Configuration
* Interface ConfigurationInterface.
*/
interface ConfigurationInterface
{
/**
* Jira host
* Jira host.
*
* @return string
*/
public function getJiraHost();

/**
* Jira login
* Jira login.
*
* @return string
*/
public function getJiraUser();

/**
* Jira password
* Jira password.
*
* @return string
*/
public function getJiraPassword();

/**
* Path to log file
* Path to log file.
*
* @return string
*/
public function getJiraLogFile();

/**
* Log level (DEBUG, INFO, ERROR, WARNING)
* Log level (DEBUG, INFO, ERROR, WARNING).
*
* @return string
*/
public function getJiraLogLevel();

/**
* Curl options CURLOPT_SSL_VERIFYHOST
* Curl options CURLOPT_SSL_VERIFYHOST.
*
* @return boolean
* @return bool
*/
public function isCurlOptSslVerifyHost();

/**
* Curl options CURLOPT_SSL_VERIFYPEER
* Curl options CURLOPT_SSL_VERIFYPEER.
*
* @return boolean
* @return bool
*/
public function isCurlOptSslVerifyPeer();

/**
* Curl options CURLOPT_VERBOSE
* Curl options CURLOPT_VERBOSE.
*
* @return boolean
* @return bool
*/
public function isCurlOptVerbose();
}
}
15 changes: 4 additions & 11 deletions src/Configuration/DotEnvConfiguration.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
<?php
/**
* Created by PhpStorm.
* User: keanor
* Date: 17.08.15
* Time: 22:01
*/

namespace JiraRestApi\Configuration;

/**
* Class DotEnvConfiguration
*
* @package JiraRestApi\Configuration
* Class DotEnvConfiguration.
*/
class DotEnvConfiguration extends AbstractConfiguration
{
Expand Down Expand Up @@ -64,7 +57,7 @@ private function env($key, $default = null)

case 'null':
case '(null)':
return null;
return;
}

if ($this->startsWith($value, '"') && endsWith($value, '"')) {
Expand Down Expand Up @@ -111,4 +104,4 @@ public function endsWith($haystack, $needles)

return false;
}
}
}
2 changes: 1 addition & 1 deletion src/Issue/Issue.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Issue implements \JsonSerializable
/* @var string */
public $key;

/** @var IssueField */
/** @var IssueField */
public $fields;

public function jsonSerialize()
Expand Down
6 changes: 2 additions & 4 deletions src/Issue/IssueField.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,8 @@ public function setIssueType($name)
}

$this->issuetype->name = $name;
}
else {
$this->issuetype = $name;
} else {
$this->issuetype = $name;
}

return $this;
Expand Down Expand Up @@ -258,5 +257,4 @@ public function getIssueType()

/** @var object */
public $timeoriginalestimate;

}
Loading

0 comments on commit 7a81d5e

Please sign in to comment.