Browse Source

Update phpdocs

Bubka 3 years ago
parent
commit
afaa1a0a7a

+ 2 - 1
app/Http/Controllers/QrCodeController.php

@@ -24,7 +24,8 @@ class QrCodeController extends Controller
     /**
      * Create a new controller instance.
      *
-     * @param  QrCodeService  $qrcodeService
+     * @param \App\Services\QrCodeService  $qrcodeService
+     * @param \App\Services\TwoFAccountService $twofaccountService
      * @return void
      */
     public function __construct(QrCodeService $qrcodeService, TwoFAccountService $twofaccountService)

+ 5 - 4
app/Http/Controllers/TwoFAccountController.php

@@ -73,7 +73,6 @@ class TwoFAccountController extends Controller
      * Store a newly created resource in storage.
      *
      * @param  \App\Http\Requests\TwoFAccountDynamicRequest  $request
-     * 
      * @return \App\Http\Resources\TwoFAccountReadResource
      */
     public function store(TwoFAccountDynamicRequest $request)
@@ -138,7 +137,6 @@ class TwoFAccountController extends Controller
      * Preview account using an uri, without any db moves
      * 
      * @param  \App\Http\Requests\TwoFAccountUriRequest  $request
-     * 
      * @return \App\Http\Resources\TwoFAccountStoreResource
      */
     public function preview(TwoFAccountUriRequest $request)
@@ -153,6 +151,7 @@ class TwoFAccountController extends Controller
      * Get a One-Time Password
      *
      * @param  \Illuminate\Http\Request  $request
+     * @param int $id
      * @return \Illuminate\Http\Response
      */
     public function otp(Request $request, $id = null)
@@ -190,7 +189,7 @@ class TwoFAccountController extends Controller
     /**
      * A simple and light method to get the account count.
      *
-     * @param  \App\TwoFAccount  $twofaccount
+     * @param  \Illuminate\Http\Request  $request
      * @return \Illuminate\Http\Response
      */
     public function count(Request $request)
@@ -204,7 +203,6 @@ class TwoFAccountController extends Controller
      * Withdraw one or more accounts from their group
      * 
      * @param \App\Http\Requests\TwoFAccountBatchRequest $request
-     * @param array $ids accounts ids to unassign
      * @return \Illuminate\Http\Response
      */
     public function withdraw(TwoFAccountBatchRequest $request)
@@ -263,6 +261,9 @@ class TwoFAccountController extends Controller
 
     /**
      * Checks ids length
+     * 
+     * @param string $ids comma-separated ids
+     * @return bool whether or not the number of ids is acceptable
      */
     private function tooManyIds(string $ids) : bool
     {

+ 3 - 6
app/Services/GroupService.php

@@ -12,6 +12,8 @@ class GroupService
 
     /**
      * Returns all existing groups
+     * 
+     * @return Collection
      */
     public function getAll() : Collection
     {
@@ -40,7 +42,6 @@ class GroupService
      * Creates a group
      * 
      * @param array $data
-     * 
      * @return Group The created group
      */
     public function create(array $data) : Group
@@ -60,7 +61,6 @@ class GroupService
      * 
      * @param Group $group The group
      * @param array $data The parameters
-     * 
      * @return Group The updated group
      */
     public function update(Group $group, array $data) : Group
@@ -77,7 +77,6 @@ class GroupService
      * Deletes one or more groups
      * 
      * @param int|array $ids group ids to delete
-     * 
      * @return int The number of deleted
      */
     public function delete($ids) : int
@@ -93,7 +92,6 @@ class GroupService
      * 
      * @param array|int $ids accounts ids to assign
      * @param Group $group The target group
-     * 
      * @return Group The updated group
      */
     public function assign(mixed $ids, Group $group = null) : Group
@@ -114,7 +112,6 @@ class GroupService
      * Finds twofaccounts assigned to the group
      * 
      * @param Group $group The group
-     * 
      * @return Collection The assigned accounts
      */
     public function getAccounts(Group $group) : Collection
@@ -128,7 +125,7 @@ class GroupService
     /**
      * Determines the destination group
      * 
-     * @return int The group ID
+     * @return Group The group
      */
     private function destinationGroup() : Group
     {