1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-24 03:12:46 +01:00

Merge pull request #20 from freescout-helpdesk/analysis-q113jj

Apply fixes from StyleCI
This commit is contained in:
FreeScout 2018-07-27 16:32:11 +03:00 committed by GitHub
commit 24582bacfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -3,8 +3,8 @@
namespace App\Http\Controllers;
use App\Conversation;
use App\Mailbox;
use App\Folder;
use App\Mailbox;
class ConversationsController extends Controller
{
@ -47,7 +47,7 @@ class ConversationsController extends Controller
$conversation = new Conversation();
$conversation->body = '';
$folder = $mailbox->folders()->where('type', Folder::TYPE_DRAFTS)->first();
return view('conversations/create', [

View File

@ -103,7 +103,7 @@ class SecureController extends Controller
if (!$response['msg'] && !$user->can('update', $conversation)) {
$response['msg'] = 'Not enough permissions';
}
if (!$response['msg'] && (int)$new_user_id != -1 && !in_array($new_user_id, $conversation->mailbox->userIdsHavingAccess())) {
if (!$response['msg'] && (int) $new_user_id != -1 && !in_array($new_user_id, $conversation->mailbox->userIdsHavingAccess())) {
$response['msg'] = 'Incorrect user';
}
if (!$response['msg']) {

View File

@ -284,15 +284,15 @@ class Thread extends Model
/**
* Get text for the assignee.
*
*
* @return string
*/
public function getAssignedName()
{
if (!$this->user_id) {
return __("anyone");
return __('anyone');
} elseif ($this->user_id == auth()->user()->id) {
return __("yourself");
return __('yourself');
} else {
return $this->user->getFullName();
}