Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Steffens committed Dec 12, 2023
1 parent 3670c52 commit b4ee705
Show file tree
Hide file tree
Showing 64 changed files with 995 additions and 1,129 deletions.
12 changes: 6 additions & 6 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@

return [
'resources' => [
'persons' => ['url' => '/persons'],
],
'routes' => [
'persons' => ['url' => '/persons'],
],
'routes' => [

// enable CORS for api calls (API version 1)
['name' => 'weightdata_api#preflighted_cors', 'url' => '/api/1/{path}',
'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']],

// main
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
// main
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
['name' => 'persons#data', 'url' => '/person/{personId}/data', 'verb' => 'GET'],
['name' => 'persons_api#data', 'url' => '/api/1/person/{personId}/data', 'verb' => 'GET'],

Expand Down Expand Up @@ -127,5 +127,5 @@
['name' => 'medicationdata_api#createMedication', 'url' => 'api/1/medication/medication/plan/{planId}', 'verb' => 'POST'],
['name' => 'medicationdata_api#deleteMedication', 'url' => 'api/1/medication/medication/{id}', 'verb' => 'DELETE'],
['name' => 'medicationdata_api#updateMedication', 'url' => 'api/1/medication/medication/{id}', 'verb' => 'PUT'],
]
]
];
17 changes: 7 additions & 10 deletions lib/Controller/ActivitiesdataApiController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Florian Steffens <flost-dev@mailbox.org>
Expand All @@ -25,9 +26,9 @@
namespace OCA\Health\Controller;

use OCA\Health\Services\ActivitiesdataService;
use OCP\IRequest;
use OCP\AppFramework\ApiController;
use OCP\AppFramework\Http\DataResponse;
use OCP\IRequest;

class ActivitiesdataApiController extends ApiController {

Expand All @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, ActivitiesdataService $
* @param int $personId
* @return DataResponse
*/
public function findByPerson(int $personId): DataResponse
{
return new DataResponse($this->activitiesdataService->getAllByPersonId($personId));
public function findByPerson(int $personId): DataResponse {
return new DataResponse($this->activitiesdataService->getAllByPersonId($personId));
}

/**
Expand All @@ -69,8 +69,7 @@ public function findByPerson(int $personId): DataResponse
* @param string $comment
* @return DataResponse
*/
public function create(int $personId, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse
{
public function create(int $personId, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse {
return new DataResponse($this->activitiesdataService->create($personId, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment));
}

Expand All @@ -82,8 +81,7 @@ public function create(int $personId, string $datetime, int $calories = null, fl
* @param int $id
* @return DataResponse
*/
public function delete(int $id): DataResponse
{
public function delete(int $id): DataResponse {
return new DataResponse($this->activitiesdataService->delete($id));
}

Expand All @@ -103,8 +101,7 @@ public function delete(int $id): DataResponse
* @param string $comment
* @return DataResponse
*/
public function update(int $id, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse
{
public function update(int $id, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse {
return new DataResponse($this->activitiesdataService->update($id, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment));
}
}
17 changes: 7 additions & 10 deletions lib/Controller/ActivitiesdataController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Florian Steffens <flost-dev@mailbox.org>
Expand All @@ -25,9 +26,9 @@
namespace OCA\Health\Controller;

use OCA\Health\Services\ActivitiesdataService;
use OCP\IRequest;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
use OCP\IRequest;

class ActivitiesdataController extends Controller {

Expand All @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, ActivitiesdataService $
* @param int $personId
* @return DataResponse
*/
public function findByPerson(int $personId): DataResponse
{
return new DataResponse($this->activitiesdataService->getAllByPersonId($personId));
public function findByPerson(int $personId): DataResponse {
return new DataResponse($this->activitiesdataService->getAllByPersonId($personId));
}

/**
Expand All @@ -66,8 +66,7 @@ public function findByPerson(int $personId): DataResponse
* @param string $comment
* @return DataResponse
*/
public function create(int $personId, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse
{
public function create(int $personId, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse {
return new DataResponse($this->activitiesdataService->create($personId, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment));
}

Expand All @@ -77,8 +76,7 @@ public function create(int $personId, string $datetime, int $calories = null, fl
* @param int $id
* @return DataResponse
*/
public function delete(int $id): DataResponse
{
public function delete(int $id): DataResponse {
return new DataResponse($this->activitiesdataService->delete($id));
}

Expand All @@ -96,8 +94,7 @@ public function delete(int $id): DataResponse
* @param string $comment
* @return DataResponse
*/
public function update(int $id, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse
{
public function update(int $id, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse {
return new DataResponse($this->activitiesdataService->update($id, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment));
}
}
17 changes: 7 additions & 10 deletions lib/Controller/FeelingdataApiController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Florian Steffens <flost-dev@mailbox.org>
Expand All @@ -25,9 +26,9 @@
namespace OCA\Health\Controller;

use OCA\Health\Services\FeelingdataService;
use OCP\IRequest;
use OCP\AppFramework\ApiController;
use OCP\AppFramework\Http\DataResponse;
use OCP\IRequest;

class FeelingdataApiController extends ApiController {

Expand All @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, FeelingdataService $mS,
* @param int $personId
* @return DataResponse
*/
public function findByPerson(int $personId): DataResponse
{
return new DataResponse($this->feelingdataService->getAllByPersonId($personId));
public function findByPerson(int $personId): DataResponse {
return new DataResponse($this->feelingdataService->getAllByPersonId($personId));
}

/**
Expand All @@ -70,8 +70,7 @@ public function findByPerson(int $personId): DataResponse
* @param string $comment
* @return DataResponse
*/
public function create(int $personId, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse
{
public function create(int $personId, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse {
return new DataResponse($this->feelingdataService->create($personId, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment));
}

Expand All @@ -83,8 +82,7 @@ public function create(int $personId, string $datetime, int $mood = null, int $s
* @param int $id
* @return DataResponse
*/
public function delete(int $id): DataResponse
{
public function delete(int $id): DataResponse {
return new DataResponse($this->feelingdataService->delete($id));
}

Expand All @@ -105,8 +103,7 @@ public function delete(int $id): DataResponse
* @param string $comment
* @return DataResponse
*/
public function update(int $id, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse
{
public function update(int $id, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse {
return new DataResponse($this->feelingdataService->update($id, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment));
}
}
17 changes: 7 additions & 10 deletions lib/Controller/FeelingdataController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Florian Steffens <flost-dev@mailbox.org>
Expand All @@ -25,9 +26,9 @@
namespace OCA\Health\Controller;

use OCA\Health\Services\FeelingdataService;
use OCP\IRequest;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
use OCP\IRequest;

class FeelingdataController extends Controller {

Expand All @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, FeelingdataService $mS,
* @param int $personId
* @return DataResponse
*/
public function findByPerson(int $personId): DataResponse
{
return new DataResponse($this->feelingdataService->getAllByPersonId($personId));
public function findByPerson(int $personId): DataResponse {
return new DataResponse($this->feelingdataService->getAllByPersonId($personId));
}

/**
Expand All @@ -67,8 +67,7 @@ public function findByPerson(int $personId): DataResponse
* @param string $comment
* @return DataResponse
*/
public function create(int $personId, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse
{
public function create(int $personId, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse {
return new DataResponse($this->feelingdataService->create($personId, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment));
}

Expand All @@ -78,8 +77,7 @@ public function create(int $personId, string $datetime, int $mood = null, int $s
* @param int $id
* @return DataResponse
*/
public function delete(int $id): DataResponse
{
public function delete(int $id): DataResponse {
return new DataResponse($this->feelingdataService->delete($id));
}

Expand All @@ -98,8 +96,7 @@ public function delete(int $id): DataResponse
* @param string $comment
* @return DataResponse
*/
public function update(int $id, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse
{
public function update(int $id, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse {
return new DataResponse($this->feelingdataService->update($id, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment));
}
}
17 changes: 7 additions & 10 deletions lib/Controller/MeasurementdataApiController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Florian Steffens <flost-dev@mailbox.org>
Expand All @@ -25,9 +26,9 @@
namespace OCA\Health\Controller;

use OCA\Health\Services\MeasurementdataService;
use OCP\IRequest;
use OCP\AppFramework\ApiController;
use OCP\AppFramework\Http\DataResponse;
use OCP\IRequest;

class MeasurementdataApiController extends ApiController {

Expand All @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, MeasurementdataService
* @param int $personId
* @return DataResponse
*/
public function findByPerson(int $personId): DataResponse
{
return new DataResponse($this->measurementdataService->getAllByPersonId($personId));
public function findByPerson(int $personId): DataResponse {
return new DataResponse($this->measurementdataService->getAllByPersonId($personId));
}

/**
Expand All @@ -74,8 +74,7 @@ public function findByPerson(int $personId): DataResponse
* @param string $comment
* @return DataResponse
*/
public function create(int $personId, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse
{
public function create(int $personId, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse {
return new DataResponse($this->measurementdataService->create($personId, $datetime, $temperature, $heartRate, $bloodPressureS, $bloodPressureD, $bloodSugar, $oxygenSat, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment));
}

Expand All @@ -87,8 +86,7 @@ public function create(int $personId, string $datetime, float $temperature = nul
* @param int $id
* @return DataResponse
*/
public function delete(int $id): DataResponse
{
public function delete(int $id): DataResponse {
return new DataResponse($this->measurementdataService->delete($id));
}

Expand All @@ -113,8 +111,7 @@ public function delete(int $id): DataResponse
* @param string $comment
* @return DataResponse
*/
public function update(int $id, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse
{
public function update(int $id, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse {
return new DataResponse($this->measurementdataService->update($id, $datetime, $temperature, $heartRate, $bloodPressureS, $bloodPressureD, $bloodSugar, $oxygenSat, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment));
}
}
17 changes: 7 additions & 10 deletions lib/Controller/MeasurementdataController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Florian Steffens <flost-dev@mailbox.org>
Expand All @@ -25,9 +26,9 @@
namespace OCA\Health\Controller;

use OCA\Health\Services\MeasurementdataService;
use OCP\IRequest;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\DataResponse;
use OCP\IRequest;

class MeasurementdataController extends Controller {

Expand All @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, MeasurementdataService
* @param int $personId
* @return DataResponse
*/
public function findByPerson(int $personId): DataResponse
{
return new DataResponse($this->measurementdataService->getAllByPersonId($personId));
public function findByPerson(int $personId): DataResponse {
return new DataResponse($this->measurementdataService->getAllByPersonId($personId));
}

/**
Expand All @@ -71,8 +71,7 @@ public function findByPerson(int $personId): DataResponse
* @param string $comment
* @return DataResponse
*/
public function create(int $personId, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse
{
public function create(int $personId, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse {
return new DataResponse($this->measurementdataService->create($personId, $datetime, $temperature, $heartRate, $bloodPressureS, $bloodPressureD, $bloodSugar, $oxygenSat, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment));
}

Expand All @@ -82,8 +81,7 @@ public function create(int $personId, string $datetime, float $temperature = nul
* @param int $id
* @return DataResponse
*/
public function delete(int $id): DataResponse
{
public function delete(int $id): DataResponse {
return new DataResponse($this->measurementdataService->delete($id));
}

Expand All @@ -106,8 +104,7 @@ public function delete(int $id): DataResponse
* @param string $comment
* @return DataResponse
*/
public function update(int $id, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse
{
public function update(int $id, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse {
return new DataResponse($this->measurementdataService->update($id, $datetime, $temperature, $heartRate, $bloodPressureS, $bloodPressureD, $bloodSugar, $oxygenSat, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment));
}
}
Loading

0 comments on commit b4ee705

Please sign in to comment.