@@ -11,22 +11,9 @@ |
||
| 11 | 11 | |
| 12 | 12 | namespace Gitamin\Http\Controllers\Dashboard; |
| 13 | 13 | |
| 14 | -use AltThree\Validator\ValidationException; |
|
| 15 | -use Gitamin\Commands\Project\AddProjectCommand; |
|
| 16 | -use Gitamin\Commands\Project\RemoveProjectCommand; |
|
| 17 | -use Gitamin\Commands\Project\UpdateProjectCommand; |
|
| 18 | -use Gitamin\Commands\Owner\AddOwnerCommand; |
|
| 19 | -use Gitamin\Commands\Owner\RemoveOwnerCommand; |
|
| 20 | -use Gitamin\Commands\Owner\UpdateOwnerCommand; |
|
| 21 | 14 | use Gitamin\Http\Controllers\Controller; |
| 22 | -use Gitamin\Models\Project; |
|
| 23 | 15 | use Gitamin\Models\Group; |
| 24 | -use Gitamin\Models\Tag; |
|
| 25 | -use GrahamCampbell\Binput\Facades\Binput; |
|
| 26 | -use Illuminate\Foundation\Bus\DispatchesJobs; |
|
| 27 | -use Illuminate\Support\Facades\Redirect; |
|
| 28 | 16 | use Illuminate\Support\Facades\View; |
| 29 | -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; |
|
| 30 | 17 | |
| 31 | 18 | class GroupsController extends Controller |
| 32 | 19 | { |
@@ -141,7 +141,6 @@ discard block |
||
| 141 | 141 | /** |
| 142 | 142 | * Shows the edit project namespace view. |
| 143 | 143 | * |
| 144 | - * @param \Gitamin\Models\ProjectNamespace $namespace |
|
| 145 | 144 | * |
| 146 | 145 | * @return \Illuminate\View\View |
| 147 | 146 | */ |
@@ -157,7 +156,6 @@ discard block |
||
| 157 | 156 | /** |
| 158 | 157 | * Updates a project namespace. |
| 159 | 158 | * |
| 160 | - * @param \Gitamin\Models\ProjectNamespace $namespace |
|
| 161 | 159 | * |
| 162 | 160 | * @return \Illuminate\Http\RedirectResponse |
| 163 | 161 | */ |
@@ -13,18 +13,14 @@ |
||
| 13 | 13 | |
| 14 | 14 | use AltThree\Validator\ValidationException; |
| 15 | 15 | use Gitamin\Commands\Owner\AddOwnerCommand; |
| 16 | -use Gitamin\Commands\Owner\RemoveOwnerCommand; |
|
| 17 | 16 | use Gitamin\Commands\Owner\UpdateOwnerCommand; |
| 18 | -use Gitamin\Models\Project; |
|
| 19 | 17 | use Gitamin\Models\Owner; |
| 20 | 18 | use Gitamin\Models\Group; |
| 21 | -use Gitamin\Models\Tag; |
|
| 22 | 19 | use Gitamin\Http\Controllers\Controller; |
| 23 | 20 | use GrahamCampbell\Binput\Facades\Binput; |
| 24 | 21 | use Illuminate\Support\Facades\Redirect; |
| 25 | 22 | use Illuminate\Support\Facades\Auth; |
| 26 | 23 | use Illuminate\Support\Facades\View; |
| 27 | -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; |
|
| 28 | 24 | use Illuminate\Database\QueryException; |
| 29 | 25 | |
| 30 | 26 | class GroupsController extends Controller |
@@ -19,13 +19,11 @@ |
||
| 19 | 19 | use GrahamCampbell\Binput\Facades\Binput; |
| 20 | 20 | use AltThree\Validator\ValidationException; |
| 21 | 21 | use Gitamin\Commands\Project\AddProjectCommand; |
| 22 | -use Gitamin\Commands\Project\RemoveProjectCommand; |
|
| 23 | 22 | use Gitamin\Commands\Project\UpdateProjectCommand; |
| 24 | 23 | use Gitamin\Models\Project; |
| 25 | 24 | use Gitamin\Models\Owner; |
| 26 | 25 | use Gitamin\Models\Group; |
| 27 | 26 | use Gitamin\Models\Tag; |
| 28 | - |
|
| 29 | 27 | use Gitamin\Http\Controllers\Controller; |
| 30 | 28 | |
| 31 | 29 | class ProjectsController extends Controller |
@@ -29,7 +29,6 @@ |
||
| 29 | 29 | |
| 30 | 30 | use AltThree\Validator\ValidatingTrait; |
| 31 | 31 | use Illuminate\Database\Eloquent\Model; |
| 32 | -use Illuminate\Support\Facades\Auth; |
|
| 33 | 32 | |
| 34 | 33 | class Owner extends Model |
| 35 | 34 | { |
@@ -15,5 +15,5 @@ |
||
| 15 | 15 | |
| 16 | 16 | interface ProjectEventInterface extends EventInterface |
| 17 | 17 | { |
| 18 | - // |
|
| 18 | + // |
|
| 19 | 19 | } |
@@ -116,11 +116,11 @@ |
||
| 116 | 116 | return $this->belongsTo(Group::class, 'owner_id', 'id'); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - /** |
|
| 120 | - * Projects can belong to an owner. |
|
| 121 | - * |
|
| 122 | - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 123 | - */ |
|
| 119 | + /** |
|
| 120 | + * Projects can belong to an owner. |
|
| 121 | + * |
|
| 122 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 123 | + */ |
|
| 124 | 124 | public function projectOwner() |
| 125 | 125 | { |
| 126 | 126 | return $this->belongsTo(Owner::class, 'owner_id', 'id'); |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function getProject($namespace, $path) |
| 24 | 24 | { |
| 25 | - $project = Project::leftJoin('namespaces', function ($join) { |
|
| 25 | + $project = Project::leftJoin('namespaces', function ($join) { |
|
| 26 | 26 | $join->on('projects.namespace_id', '=', 'namespaces.id'); |
| 27 | 27 | })->where('projects.path', '=', $path)->where('namespaces.path', '=', $namespace)->first(['projects.*']); |
| 28 | 28 | |
| 29 | - return $project; |
|
| 29 | + return $project; |
|
| 30 | 30 | } |
| 31 | 31 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function getProject($namespace, $path) |
| 24 | 24 | { |
| 25 | - $project = Project::leftJoin('namespaces', function ($join) { |
|
| 25 | + $project = Project::leftJoin('namespaces', function($join) { |
|
| 26 | 26 | $join->on('projects.namespace_id', '=', 'namespaces.id'); |
| 27 | 27 | })->where('projects.path', '=', $path)->where('namespaces.path', '=', $namespace)->first(['projects.*']); |
| 28 | 28 | |