Merge branch 'codestyle-fixes'

This commit is contained in:
Dmitry Khomutov 2018-02-23 23:05:22 +07:00
commit 4a8d66beaf
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
5 changed files with 7 additions and 7 deletions

View file

@ -164,7 +164,6 @@ class WebhookController extends Controller
return ['status' => 'ok'];
}
$headers = [];
$username = Config::getInstance()->get('php-censor.bitbucket.username');
$appPassword = Config::getInstance()->get('php-censor.bitbucket.app_password');

View file

@ -33,7 +33,8 @@ class Bitbucket
$url = '/1.0/repositories/' . $repo . '/pullrequests/' . $pullId . '/comments/';
$client = new Client(['base_uri' => 'https://api.bitbucket.org']);
$response = $client->post($url, [
$client->post($url, [
'auth' => [$username, $appPassword],
'headers' => [
'Content-Type' => 'application/json',
@ -69,7 +70,8 @@ class Bitbucket
$url = '/1.0/repositories/' . $repo . '/changesets/' . $commitId . '/comments';
$client = new Client(['base_uri' => 'https://api.bitbucket.org']);
$response = $client->post($url, [
$client->post($url, [
'auth' => [$username, $appPassword],
'headers' => [
'Content-Type' => 'application/json',

View file

@ -257,7 +257,6 @@ class BitbucketBuild extends RemoteGitBuild
false
);
//$file = $builder->buildPath.'test.php';
if ($allowCommentCommit || $allowCommentPullRequest) {
$diffLineNumber = $this->getDiffLineNumber($builder, $file, $lineStart);

View file

@ -80,7 +80,7 @@ class View
/**
* @return boolean
*/
protected function LoginIsDisabled()
protected function loginIsDisabled()
{
$config = Config::getInstance();
$disableAuth = (boolean)$config->get('php-censor.security.disable_auth', false);

View file

@ -93,7 +93,7 @@ $user = $this->getUser();
</ul>
</li>
<?php if (!$this->LoginIsDisabled()): ?>
<?php if (!$this->loginIsDisabled()): ?>
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
@ -130,7 +130,7 @@ $user = $this->getUser();
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<?php if (!$this->LoginIsDisabled()): ?>
<?php if (!$this->loginIsDisabled()): ?>
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">