Skip to content

Commit

Permalink
Merge pull request #1441 from younginnovations/1433-organisation-data…
Browse files Browse the repository at this point in the history
…set-being-deleted-by-archiver-when-organisation-dataset-is-published-after-unpublishing-it

Review: 1433-organisation-dataset-being-deleted-by-archiver-when-organisation-dataset-is-published-after-unpublishing-it
  • Loading branch information
A4family authored May 13, 2024
2 parents 4fcedd4 + 01bd20f commit e11e04f
Show file tree
Hide file tree
Showing 41 changed files with 150 additions and 151 deletions.
18 changes: 9 additions & 9 deletions app/CsvImporter/Entities/Activity/Components/Elements/Budget.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class Budget extends Element
* @var array
*/
private array $_csvHeaders
= [
'budget_type',
'budget_status',
'budget_period_start',
'budget_period_end',
'budget_value',
'budget_value_date',
'budget_currency',
];
= [
'budget_type',
'budget_status',
'budget_period_start',
'budget_period_end',
'budget_value',
'budget_value_date',
'budget_currency',
];

/**
* Index under which the data is stored within the object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class Condition extends Element
* @var array
*/
private array $_csvHeaders
= [
'conditions_attached',
'condition_type',
'condition_narrative',
];
= [
'conditions_attached',
'condition_type',
'condition_narrative',
];

/**
* Index under which the data is stored within the object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class CountryBudgetItem extends Element
* @var array
*/
private array $_csvHeaders
= [
'country_budget_item_vocabulary',
'budget_item_code',
'budget_item_percentage',
'budget_item_description',
];
= [
'country_budget_item_vocabulary',
'budget_item_code',
'budget_item_percentage',
'budget_item_description',
];

/**
* Index under which the data is stored within the object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class HumanitarianScope extends Element
* @var array
*/
private array $_csvHeaders
= [
'humanitarian_scope_type',
'humanitarian_scope_vocabulary',
'humanitarian_scope_vocabulary_uri',
'humanitarian_scope_code',
'humanitarian_scope_narrative',
];
= [
'humanitarian_scope_type',
'humanitarian_scope_vocabulary',
'humanitarian_scope_vocabulary_uri',
'humanitarian_scope_code',
'humanitarian_scope_narrative',
];

/**
* Index under which the data is stored within the object.
Expand Down
36 changes: 18 additions & 18 deletions app/CsvImporter/Entities/Activity/Components/Elements/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ class Location extends Element
* @var array
*/
private array $_csvHeaders
= [
'location_reference',
'location_reach_code',
'location_id_vocabulary',
'location_id_code',
'location_name',
'location_description',
'location_activity_description',
'location_administrative_vocabulary',
'location_administrative_code',
'location_administrative_level',
'location_point_srsname',
'pos_latitude',
'pos_longitude',
'location_exactness',
'location_class',
'feature_designation',
];
= [
'location_reference',
'location_reach_code',
'location_id_vocabulary',
'location_id_code',
'location_name',
'location_description',
'location_activity_description',
'location_administrative_vocabulary',
'location_administrative_code',
'location_administrative_level',
'location_point_srsname',
'pos_latitude',
'pos_longitude',
'location_exactness',
'location_class',
'feature_designation',
];

/**
* Index under which the data is stored within the object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ class PlannedDisbursement extends Element
* @var array
*/
private array $_csvHeaders
= [
'planned_disbursement_type',
'planned_disbursement_period_start',
'planned_disbursement_period_end',
'planned_disbursement_value',
'planned_disbursement_value_currency',
'planned_disbursement_value_date',
'planned_disbursement_provider_org_reference',
'planned_disbursement_provider_org_activity_id',
'planned_disbursement_provider_org_type',
'planned_disbursement_provider_org_narrative',
'planned_disbursement_receiver_org_reference',
'planned_disbursement_receiver_org_activity_id',
'planned_disbursement_receiver_org_type',
'planned_disbursement_receiver_org_narrative',
];
= [
'planned_disbursement_type',
'planned_disbursement_period_start',
'planned_disbursement_period_end',
'planned_disbursement_value',
'planned_disbursement_value_currency',
'planned_disbursement_value_date',
'planned_disbursement_provider_org_reference',
'planned_disbursement_provider_org_activity_id',
'planned_disbursement_provider_org_type',
'planned_disbursement_provider_org_narrative',
'planned_disbursement_receiver_org_reference',
'planned_disbursement_receiver_org_activity_id',
'planned_disbursement_receiver_org_type',
'planned_disbursement_receiver_org_narrative',
];

/**
* Index under which the data is stored within the object.
Expand Down
2 changes: 1 addition & 1 deletion app/Helpers/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function getEncodingType($file): string
}

return 'UTF-8';
} catch (\Exception $exception) {
} catch (Exception $exception) {
return 'UTF-8';
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Admin/Activity/ActivityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function destroy($activityId): JsonResponse
}

return response()->json(['success' => false, 'message' => 'Activity delete failed.']);
} catch (\Exception $e) {
} catch (Exception $e) {
logger()->error($e->getMessage());

return response()->json(['success' => false, 'message' => $e->getMessage()]);
Expand Down Expand Up @@ -355,7 +355,7 @@ public function getPaginatedActivities(Request $request, int $page = 1): JsonRes
'message' => 'Activities fetched successfully',
'data' => $activities,
]);
} catch (\Exception $e) {
} catch (Exception $e) {
logger()->error($e->getMessage());

return response()->json(['success' => false, 'message' => 'Error occurred while fetching the data']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
class OtherIdentifierController extends Controller
{
/**
* @var otherIdentifierService
* @var OtherIdentifierService
*/
protected OtherIdentifierService $otherIdentifierService;

/**
* OtherIdentifierController Constructor.
*
* @param otherIdentifierService $otherIdentifierService
* @param OtherIdentifierService $otherIdentifierService
*/
public function __construct(OtherIdentifierService $otherIdentifierService)
{
Expand All @@ -36,7 +36,7 @@ public function __construct(OtherIdentifierService $otherIdentifierService)
*
* @param int $id
*
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|void
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|View|void
*/
public function edit(int $id): View|RedirectResponse
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ReportingOrgController extends Controller
/**
* ReportingOrgController Constructor.
*
* @param reportingOrgService $reportingOrgService
* @param ReportingOrgService $reportingOrgService
*/
public function __construct(ReportingOrgService $reportingOrgService)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DashboardController extends Controller
public DashboardService $dashboardService;

/**
* @var CSVGenerator
* @var CsvGenerator
*/
public CsvGenerator $csvGenerator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class DocumentLinkController extends Controller
/**
* DocumentLinkController Constructor.
*
* @param documentLinkService $documentLinkService
* @param DocumentLinkService $documentLinkService
*/
public function __construct(documentLinkService $documentLinkService)
public function __construct(DocumentLinkService $documentLinkService)
{
$this->documentLinkService = $documentLinkService;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RecipientCountryBudgetController extends Controller
/**
* RecipientCountryBudgetController Constructor.
*
* @param recipientCountryBudgetService $recipientCountryBudgetService
* @param RecipientCountryBudgetService $recipientCountryBudgetService
*/
public function __construct(RecipientCountryBudgetService $recipientCountryBudgetService)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RecipientOrgBudgetController extends Controller
/**
* RecipientOrgBudgetController Constructor.
*
* @param recipientOrgBudgetService $recipientOrgBudgetService
* @param RecipientOrgBudgetService $recipientOrgBudgetService
*/
public function __construct(RecipientOrgBudgetService $recipientOrgBudgetService)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RecipientRegionBudgetController extends Controller
/**
* RecipientRegionBudgetController Constructor.
*
* @param recipientRegionBudgetService $recipientRegionBudgetService
* @param RecipientRegionBudgetService $recipientRegionBudgetService
*/
public function __construct(RecipientRegionBudgetService $recipientRegionBudgetService)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ class ReportingOrgController extends Controller
/**
* @var ReportingOrgService
*/
protected reportingOrgService $reportingOrgService;
protected ReportingOrgService $reportingOrgService;

/**
* ReportingOrgController Constructor.
*
* @param reportingOrgService $reportingOrgService
* @param ReportingOrgService $reportingOrgService
*/
public function __construct(reportingOrgService $reportingOrgService)
public function __construct(ReportingOrgService $reportingOrgService)
{
$this->reportingOrgService = $reportingOrgService;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
*/
class TotalBudgetController extends Controller
{
protected totalBudgetService $totalBudgetService;
protected TotalBudgetService $totalBudgetService;

/**
* TotalBudgetController Constructor.
*
* @param totalBudgetService $totalBudgetService
* @param TotalBudgetService $totalBudgetService
*/
public function __construct(TotalBudgetService $totalBudgetService)
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Admin/User/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class UserController extends Controller
* @param DatabaseManager $db
* @param DashboardService $dashboardService
*/
public function __construct(UserService $userService, OrganizationService $organizationService, AuditService $auditService, CSVGenerator $csvGenerator, DatabaseManager $db, DashboardService $dashboardService)
public function __construct(UserService $userService, OrganizationService $organizationService, AuditService $auditService, CsvGenerator $csvGenerator, DatabaseManager $db, DashboardService $dashboardService)
{
$this->userService = $userService;
$this->organizationService = $organizationService;
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Auth/ForgotPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public function showEmailSentMessage(): \Illuminate\View\View
/**
* Get the response for a successful password reset link.
*
* @param \Illuminate\Http\Request $request
* @param Request $request
* @param string $response
*
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
* @return \Illuminate\Http\RedirectResponse|JsonResponse
*/
protected function sendResetLinkResponse(Request $request, $response): \Illuminate\Http\RedirectResponse|JsonResponse
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Auth/IatiRegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ protected function create(array $data): array
$this->db->commit();

return ['success' => true, 'user' => $user];
} catch (\Exception $e) {
} catch (Exception $e) {
logger()->error($e);
}
}
Expand All @@ -303,7 +303,7 @@ public function showRegistrationForm(): \Illuminate\View\View
];

return view('web.iati_register', compact('types'));
} catch (\Exception $e) {
} catch (Exception $e) {
logger()->error($e->getMessage());

return view('web.welcome');
Expand Down
10 changes: 5 additions & 5 deletions app/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ResetPasswordController extends Controller
*
* If no token is present, display the link request form.
*
* @param \Illuminate\Http\Request $request
* @param Request $request
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
Expand All @@ -60,10 +60,10 @@ public function showResetForm(Request $request)
/**
* Get the response for a successful password reset.
*
* @param \Illuminate\Http\Request $request
* @param Request $request
* @param string $response
*
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
* @return \Illuminate\Http\RedirectResponse|JsonResponse
*/
protected function sendResetResponse(Request $request, $response): JsonResponse|\Illuminate\Http\RedirectResponse
{
Expand Down Expand Up @@ -93,8 +93,8 @@ protected function rules(): array
/**
* Reset the given user's password.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|JsonResponse
*/
public function reset(Request $request)
{
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/Auth/VerificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ public function __construct()
/**
* Mark the authenticated user's email address as verified.
*
* @param \Illuminate\Http\Request $request
* @param Request $request
*
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
* @return JsonResponse|\Illuminate\Http\RedirectResponse
*
* @throws \Illuminate\Auth\Access\AuthorizationException
* @throws AuthorizationException
*/
public function verify(Request $request): JsonResponse|\Illuminate\Http\RedirectResponse
{
Expand Down
Loading

0 comments on commit e11e04f

Please sign in to comment.