Skip to content

Commit 38ca315

Browse files
committed
Merge branch 'master' of github.com:joomla-framework/github-api into 2.0-dev
2 parents 08774e2 + 6158035 commit 38ca315

20 files changed

Lines changed: 46 additions & 47 deletions

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ matrix:
2222
- php: 7.2
2323
- php: nightly
2424
allow_failures:
25-
- php: 7.2
2625
- php: nightly
2726

2827
before_script:

src/AbstractGithubObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function __construct(Registry $options = null, Http $client = null)
8686
$this->options = $options ?: new Registry;
8787
$this->client = $client ?: (new HttpFactory)->getHttp($this->options);
8888

89-
$this->package = get_class($this);
89+
$this->package = \get_class($this);
9090
$this->package = substr($this->package, strrpos($this->package, '\\') + 1);
9191
}
9292

src/AbstractPackage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(Registry $options = null, Http $client = null)
3030
{
3131
parent::__construct($options, $client);
3232

33-
$this->package = get_class($this);
33+
$this->package = \get_class($this);
3434
$this->package = substr($this->package, strrpos($this->package, '\\') + 1);
3535
}
3636

src/Package/Activity/Starring.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getRepositories($user = '', $sort = 'created', $direction = 'des
5858
$allowedSort = array('created', 'updated');
5959
$allowedDir = array('asc', 'desc');
6060

61-
if (!in_array($sort, $allowedSort))
61+
if (!\in_array($sort, $allowedSort))
6262
{
6363
throw new \InvalidArgumentException(
6464
sprintf(
@@ -68,7 +68,7 @@ public function getRepositories($user = '', $sort = 'created', $direction = 'des
6868
);
6969
}
7070

71-
if (!in_array($direction, $allowedDir))
71+
if (!\in_array($direction, $allowedDir))
7272
{
7373
throw new \InvalidArgumentException(
7474
sprintf(

src/Package/Issues.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function create($user, $repo, $title, $body = null, $assignee = null, $mi
6161
'body' => $body
6262
);
6363

64-
if (is_string($assignee) && !empty($assignees))
64+
if (\is_string($assignee) && !empty($assignees))
6565
{
6666
throw new \UnexpectedValueException('You cannot pass both assignee and assignees. Only one may be provided.');
6767
}
@@ -70,7 +70,7 @@ public function create($user, $repo, $title, $body = null, $assignee = null, $mi
7070
{
7171
$data['assignees'] = array_values($assignees);
7272
}
73-
elseif (is_string($assignee))
73+
elseif (\is_string($assignee))
7474
{
7575
$data['assignee'] = $assignee;
7676
}

src/Package/Issues/Comments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function getRepositoryList($owner, $repo, $sort = 'created', $direction =
7373
// Build the request path.
7474
$path = '/repos/' . $owner . '/' . $repo . '/issues/comments';
7575

76-
if (false == in_array($sort, array('created', 'updated')))
76+
if (false == \in_array($sort, array('created', 'updated')))
7777
{
7878
throw new \UnexpectedValueException(
7979
sprintf(
@@ -82,7 +82,7 @@ public function getRepositoryList($owner, $repo, $sort = 'created', $direction =
8282
);
8383
}
8484

85-
if (false == in_array($direction, array('asc', 'desc')))
85+
if (false == \in_array($direction, array('asc', 'desc')))
8686
{
8787
throw new \UnexpectedValueException(
8888
sprintf(

src/Package/Issues/Milestones.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,17 @@ public function create($user, $repo, $title, $state = null, $description = null,
9696
'title' => $title
9797
);
9898

99-
if (!is_null($state))
99+
if (!\is_null($state))
100100
{
101101
$data['state'] = $state;
102102
}
103103

104-
if (!is_null($description))
104+
if (!\is_null($description))
105105
{
106106
$data['description'] = $description;
107107
}
108108

109-
if (!is_null($dueOn))
109+
if (!\is_null($dueOn))
110110
{
111111
$data['due_on'] = $dueOn;
112112
}
@@ -142,22 +142,22 @@ public function edit($user, $repo, $milestoneId, $title = null, $state = null, $
142142
// Build the request data.
143143
$data = array();
144144

145-
if (!is_null($title))
145+
if (!\is_null($title))
146146
{
147147
$data['title'] = $title;
148148
}
149149

150-
if (!is_null($state))
150+
if (!\is_null($state))
151151
{
152152
$data['state'] = $state;
153153
}
154154

155-
if (!is_null($description))
155+
if (!\is_null($description))
156156
{
157157
$data['description'] = $description;
158158
}
159159

160-
if (!is_null($dueOn))
160+
if (!\is_null($dueOn))
161161
{
162162
$data['due_on'] = $dueOn;
163163
}

src/Package/Markdown.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function render($text, $mode = 'gfm', $context = null)
3939
$validModes = array('gfm', 'markdown');
4040

4141
// Make sure the scope is valid
42-
if (!in_array($mode, $validModes))
42+
if (!\in_array($mode, $validModes))
4343
{
4444
throw new \InvalidArgumentException(sprintf('The %s mode is not valid. Valid modes are "gfm" or "markdown".', $mode));
4545
}

src/Package/Orgs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function edit($org, $billingEmail = '', $company = '', $email = '', $loca
9090

9191
$data = array();
9292

93-
$fArgs = func_get_args();
93+
$fArgs = \func_get_args();
9494

9595
foreach ($args as $i => $arg)
9696
{

src/Package/Orgs/Hooks.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function create($org, $url, $contentType = 'form', $secret = null, $insec
8585
// Build the request path.
8686
$path = "/orgs/$org/hooks";
8787

88-
if (false == in_array($contentType, array('form', 'json')))
88+
if (false == \in_array($contentType, array('form', 'json')))
8989
{
9090
throw new \UnexpectedValueException('Content type must be either "form" or "json".');
9191
}
@@ -112,7 +112,7 @@ public function create($org, $url, $contentType = 'form', $secret = null, $insec
112112
// Check to ensure all events are in the allowed list
113113
foreach ($events as $event)
114114
{
115-
if (!in_array($event, $this->hookEvents))
115+
if (!\in_array($event, $this->hookEvents))
116116
{
117117
throw new \RuntimeException('Your events array contains an unauthorized event.');
118118
}
@@ -157,7 +157,7 @@ public function edit($org, $url, $contentType = null, $secret = null, $insecureS
157157

158158
if ($contentType)
159159
{
160-
if (false == in_array($contentType, array('form', 'json')))
160+
if (false == \in_array($contentType, array('form', 'json')))
161161
{
162162
throw new \UnexpectedValueException('Content type must be either "form" or "json".');
163163
}
@@ -189,7 +189,7 @@ public function edit($org, $url, $contentType = null, $secret = null, $insecureS
189189
// Check to ensure all events are in the allowed list
190190
foreach ($events as $event)
191191
{
192-
if (!in_array($event, $this->hookEvents))
192+
if (!\in_array($event, $this->hookEvents))
193193
{
194194
throw new \RuntimeException('Your events array contains an unauthorized event.');
195195
}

0 commit comments

Comments
 (0)