mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2024-12-22 19:09:00 +00:00
Fixed codestyle
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
parent
ef98862329
commit
3f60741211
@ -573,56 +573,56 @@ class PullsModel extends AbstractModel
|
|||||||
|
|
||||||
foreach ($pulls as $pull)
|
foreach ($pulls as $pull)
|
||||||
{
|
{
|
||||||
// Check if this PR is RTC and has a `PR-` branch label
|
// Check if this PR is RTC and has a `PR-` branch label
|
||||||
$isRTC = false;
|
$isRTC = false;
|
||||||
$isNPM = false;
|
$isNPM = false;
|
||||||
$branch = '';
|
$branch = '';
|
||||||
|
|
||||||
foreach ($pull->labels as $label)
|
foreach ($pull->labels as $label)
|
||||||
|
{
|
||||||
|
if (strtolower($label->name) === 'rtc')
|
||||||
{
|
{
|
||||||
if (strtolower($label->name) === 'rtc')
|
$isRTC = true;
|
||||||
{
|
}
|
||||||
$isRTC = true;
|
elseif (strpos($label->name, 'PR-') === 0)
|
||||||
}
|
{
|
||||||
elseif (strpos($label->name, 'PR-') === 0)
|
$branch = substr($label->name, 3);
|
||||||
{
|
}
|
||||||
$branch = substr($label->name, 3);
|
elseif (in_array(
|
||||||
}
|
strtolower($label->name),
|
||||||
elseif (in_array(
|
['npm resource changed', 'composer dependency changed'],
|
||||||
strtolower($label->name),
|
true
|
||||||
['npm resource changed', 'composer dependency changed'],
|
))
|
||||||
true
|
{
|
||||||
))
|
$isNPM = true;
|
||||||
{
|
|
||||||
$isNPM = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$labels[] = implode(
|
|
||||||
',',
|
|
||||||
[
|
|
||||||
(int) $pull->number,
|
|
||||||
$this->getDb()->quote($label->name),
|
|
||||||
$this->getDb()->quote($label->color),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build the data object to store in the database
|
$labels[] = implode(
|
||||||
$pullData = [
|
',',
|
||||||
(int) $pull->number,
|
[
|
||||||
$this->getDb()->quote(
|
(int) $pull->number,
|
||||||
HTMLHelper::_('string.truncate', $pull->title, 150)
|
$this->getDb()->quote($label->name),
|
||||||
),
|
$this->getDb()->quote($label->color),
|
||||||
$this->getDb()->quote(
|
]
|
||||||
HTMLHelper::_('string.truncate', $pull->body, 100)
|
);
|
||||||
),
|
}
|
||||||
$this->getDb()->quote($pull->html_url),
|
|
||||||
(int) $isRTC,
|
|
||||||
(int) $isNPM,
|
|
||||||
$this->getDb()->quote($branch),
|
|
||||||
];
|
|
||||||
|
|
||||||
$data[] = implode(',', $pullData);
|
// Build the data object to store in the database
|
||||||
|
$pullData = [
|
||||||
|
(int) $pull->number,
|
||||||
|
$this->getDb()->quote(
|
||||||
|
HTMLHelper::_('string.truncate', $pull->title, 150)
|
||||||
|
),
|
||||||
|
$this->getDb()->quote(
|
||||||
|
HTMLHelper::_('string.truncate', $pull->body, 100)
|
||||||
|
),
|
||||||
|
$this->getDb()->quote($pull->html_url),
|
||||||
|
(int) $isRTC,
|
||||||
|
(int) $isNPM,
|
||||||
|
$this->getDb()->quote($branch),
|
||||||
|
];
|
||||||
|
|
||||||
|
$data[] = implode(',', $pullData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there are no pulls to insert then bail, assume we're finished
|
// If there are no pulls to insert then bail, assume we're finished
|
||||||
|
Loading…
Reference in New Issue
Block a user