Skip to content

Commit

Permalink
Merge pull request #19 from freescout-helpdesk/analysis-8A532V
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
freescout-helpdesk authored Jul 27, 2018
2 parents 3a0d8b7 + 0ce7cce commit 12d92a4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/Conversation.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public function setStatus($status, $user = null)

/**
* Set conversation user and all related fields.
*
*
* @param int $user_id
*/
public function setUser($user_id)
Expand Down
1 change: 0 additions & 1 deletion app/Http/Controllers/ConversationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Http\Controllers;

use App\Conversation;
use Illuminate\Http\Request;

class ConversationsController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/SecureController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace App\Http\Controllers;

use App\ActivityLog;
use Illuminate\Http\Request;
use App\Conversation;
use App\Events\ConversationStatusChanged;
use App\Events\ConversationUserChanged;
use Illuminate\Http\Request;

class SecureController extends Controller
{
Expand Down Expand Up @@ -92,7 +92,7 @@ public function ajax(Request $request)
case 'conversation_change_user':
$conversation = Conversation::find($request->conversation_id);

$new_user_id = (int)$request->user_id;
$new_user_id = (int) $request->user_id;

if (!$conversation) {
$response['msg'] = 'Conversation not found';
Expand Down
5 changes: 3 additions & 2 deletions app/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Hash;
use App\User;

class Mailbox extends Model
{
Expand Down Expand Up @@ -210,7 +209,7 @@ public function updateFoldersCounters()
->where('status', Conversation::STATUS_ACTIVE)
->where('user_id', $folder->user_id)
->count();
// todo: starred conversations counting
// todo: starred conversations counting
} else {
$folder->active_count = $folder->conversations()
->where('status', Conversation::STATUS_ACTIVE)
Expand Down Expand Up @@ -268,6 +267,7 @@ public function usersHavingAccess()
{
$users = $this->users;
$admins = User::where('role', User::ROLE_ADMIN)->get();

return $users->merge($admins)->unique();
}

Expand All @@ -278,6 +278,7 @@ public function userIdsHavingAccess()
{
$user_ids = $this->users()->pluck('users.id');
$admin_ids = User::where('role', User::ROLE_ADMIN)->pluck('id');

return $user_ids->merge($admin_ids)->unique()->toArray();
}
}
6 changes: 3 additions & 3 deletions app/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,15 @@ public static function statusCodeToName($status)

/**
* 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();
}
Expand Down

0 comments on commit 12d92a4

Please sign in to comment.