Skip to content

Commit

Permalink
Misc: add typehints & remove un-used code
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
satrun77 committed May 9, 2016
1 parent 858be20 commit 91f8d96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
7 changes: 0 additions & 7 deletions app/Form/FilterIssue.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@ public function fields()
// Array of project users
$assignTo = [0 => trans('tinyissue.allusers')] + $this->project->users()->get()->lists('fullname', 'id')->all();

// On submit, generate list of selected tags to populate the field
if (Request::has('tags')) {
$selectTags = (new Model\Tag())->tagsToJson(Request::input('tags'));
} else {
$selectTags = '';
}

$fields = [
'keyword' => [
'type' => 'text',
Expand Down
5 changes: 2 additions & 3 deletions app/Model/Traits/Project/QueryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Database\Query;
use Tinyissue\Model\Project;
use Tinyissue\Model\Tag;
use Tinyissue\Model\User;

/**
Expand Down Expand Up @@ -178,7 +177,7 @@ public function projectsWidthIssues($status = Project::STATUS_OPEN, $private = P
public function getKanbanTagsForUser(User $user)
{
$tags = $this->kanbanTags()
->where(function ($query) use ($user) {
->where(function (Eloquent\Builder $query) use ($user) {
$query->where('role_limit', '<=', $user->role_id);
$query->orWhere('role_limit', '=', null);
})
Expand All @@ -203,7 +202,7 @@ public function issuesGroupByTags($tagIds)
->join('projects_issues_tags', 'issue_id', '=', 'id')
->orderBy('id')
->get()
->groupBy(function (Project\Issue $issue) use ($tagIds) {
->groupBy(function (Project\Issue $issue) {
return $issue->tags->last()->name;
});

Expand Down

0 comments on commit 91f8d96

Please sign in to comment.