One day eslint will have a PHP counterpart that works in Atom... 🤔

This commit is contained in:
Dane Everitt 2017-01-31 20:04:34 -05:00 committed by GitHub
parent 1679d866a5
commit e5ed1c7f6a
2 changed files with 9 additions and 9 deletions

View file

@ -40,7 +40,7 @@ class PackController extends Controller
} }
/** /**
* Pulls an install pack archive from the system * Pulls an install pack archive from the system.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
@ -49,12 +49,12 @@ class PackController extends Controller
{ {
$pack = Models\ServicePack::where('uuid', $uuid)->first(); $pack = Models\ServicePack::where('uuid', $uuid)->first();
if (!$pack) { if (! $pack) {
return response()->json([ 'error' => 'No such pack.' ], 404); return response()->json(['error' => 'No such pack.'], 404);
} }
if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) { if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) {
return response()->json([ 'error' => 'There is no archive available for this pack.' ], 503); return response()->json(['error' => 'There is no archive available for this pack.'], 503);
} }
return response()->download(storage_path('app/packs/' . $pack->uuid . '/archive.tar.gz')); return response()->download(storage_path('app/packs/' . $pack->uuid . '/archive.tar.gz'));
@ -70,12 +70,12 @@ class PackController extends Controller
{ {
$pack = Models\ServicePack::where('uuid', $uuid)->first(); $pack = Models\ServicePack::where('uuid', $uuid)->first();
if (!$pack) { if (! $pack) {
return response()->json([ 'error' => 'No such pack.' ], 404); return response()->json(['error' => 'No such pack.'], 404);
} }
if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) { if (! Storage::exists('packs/' . $pack->uuid . '/archive.tar.gz')) {
return response()->json([ 'error' => 'There is no archive available for this pack.' ], 503); return response()->json(['error' => 'There is no archive available for this pack.'], 503);
} }
return response()->json([ return response()->json([
@ -84,13 +84,12 @@ class PackController extends Controller
} }
/** /**
* Pulls an update pack archive from the system * Pulls an update pack archive from the system.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function pullUpdate(Request $request) public function pullUpdate(Request $request)
{ {
} }
} }

View file

@ -786,6 +786,7 @@ class ServerRepository
} }
$server->delete(); $server->delete();
return DB::commit(); return DB::commit();
} catch (\Exception $ex) { } catch (\Exception $ex) {
DB::rollBack(); DB::rollBack();