use new namespace style

This commit is contained in:
Marc Michalsky 2023-08-16 14:03:44 +02:00 committed by Jens Schuppe
parent c971b6f8eb
commit db94f26d6d
3 changed files with 9 additions and 3 deletions

View file

@ -1,12 +1,14 @@
<?php <?php
namespace CRM\Twingle\Exceptions;
use CRM_Twingle_ExtensionUtil as E; use CRM_Twingle_ExtensionUtil as E;
/** /**
* A simple custom exception class that indicates a problem within a class * A simple custom exception class that indicates a problem within a class
* of the Twingle API extension. * of the Twingle API extension.
*/ */
class CRM_Twingle_Exceptions_BaseException extends Exception { class BaseException extends \Exception {
private string $error_code; private string $error_code;
private string $log_message; private string $log_message;

View file

@ -1,10 +1,12 @@
<?php <?php
namespace CRM\Twingle\Exceptions;
/** /**
* A simple custom exception that indicates a problem within the * A simple custom exception that indicates a problem within the
* CRM_Twingle_Profile class * CRM_Twingle_Profile class
*/ */
class CRM_Twingle_Exceptions_ProfileException extends CRM_Twingle_Exceptions_BaseException { class ProfileException extends BaseException {
public const ERROR_CODE_PROFILE_NOT_FOUND = 'profile_not_found'; public const ERROR_CODE_PROFILE_NOT_FOUND = 'profile_not_found';
public const ERROR_CODE_DEFAULT_PROFILE_NOT_FOUND = 'default_profile_not_found'; public const ERROR_CODE_DEFAULT_PROFILE_NOT_FOUND = 'default_profile_not_found';

View file

@ -1,10 +1,12 @@
<?php <?php
namespace CRM\Twingle\Exceptions;
/** /**
* A simple custom error indicating a problem with the validation of the * A simple custom error indicating a problem with the validation of the
* CRM_Twingle_Profile * CRM_Twingle_Profile
*/ */
class CRM_Twingle_Exceptions_ProfileValidationError extends CRM_Twingle_Exceptions_BaseException { class ProfileValidationError extends BaseException {
private string $affected_field_name; private string $affected_field_name;
public const ERROR_CODE_PROFILE_VALIDATION_FAILED = 'profile_validation_failed'; public const ERROR_CODE_PROFILE_VALIDATION_FAILED = 'profile_validation_failed';