Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(REF) Remove constructors that do nothing #22544

Merged
merged 2 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions CRM/Contact/Page/View/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ class CRM_Contact_Page_View_CustomData extends CRM_Core_Page {
*/
public $_groupId;

/**
* Class constructor.
*
* @return CRM_Contact_Page_View_CustomData
*/
public function __construct() {
parent::__construct();
}

/**
* Add a few specific things to view contact.
*/
Expand Down
7 changes: 0 additions & 7 deletions CRM/Contribute/BAO/ContributionSoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
*/
class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_ContributionSoft {

/**
* Construct method.
*/
public function __construct() {
parent::__construct();
}

/**
* Add contribution soft credit record.
*
Expand Down
11 changes: 0 additions & 11 deletions CRM/Core/BAO/FinancialTrxn.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@
* @copyright CiviCRM LLC https://civicrm.org/licensing
*/
class CRM_Core_BAO_FinancialTrxn extends CRM_Financial_DAO_FinancialTrxn {
/**
* Class constructor.
*
* @return \CRM_Financial_DAO_FinancialTrxn
*/

/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will make @pradpnayak's PR stale - should be an easy tweak to that PR but it might come back depending on how the merge conflict fixing goes...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is probably easier to rebase if you wanna merge that one first.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colemanw #22400 is currently failed tests - I pulled out #22546 as a partial that renames the class & adds in the temporary placeholder class that extends the new 'real' class and removed the constructor. Hopefully that passes & has the changes from both PRs that touch this file (without having an answer on the failing tests at this stage)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colemanw this got merged in the meantime - turns out the test error @pradpnayak was hitting is still present in the smallest version of the patch & I can't run the test myself to see why

*/
public function __construct() {
parent::__construct();
}

/**
* Takes an associative array and creates a financial transaction object.
Expand Down
8 changes: 0 additions & 8 deletions CRM/Core/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ class CRM_Core_Config extends CRM_Core_Config_MagicMerge {
*/
private static $_singleton = NULL;

/**
* The constructor. Sets domain id if defined, otherwise assumes
* single instance installation.
*/
public function __construct() {
parent::__construct();
}

/**
* Singleton function used to manage this object.
*
Expand Down
9 changes: 0 additions & 9 deletions CRM/Core/Smarty.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ class CRM_Core_Smarty extends Smarty {
*/
private $backupFrames = [];

/**
* Class constructor.
*
* @return CRM_Core_Smarty
*/
public function __construct() {
parent::__construct();
}

private function initialize() {
$config = CRM_Core_Config::singleton();

Expand Down
6 changes: 0 additions & 6 deletions CRM/Event/BAO/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant {
'Pending from approval' => ['Registered', 'Cancelled'],
];

/**
*/
public function __construct() {
parent::__construct();
}

/**
* Takes an associative array and creates a participant object.
*
Expand Down
6 changes: 0 additions & 6 deletions CRM/Friend/BAO/Friend.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ class CRM_Friend_BAO_Friend extends CRM_Friend_DAO_Friend {
*/
public $_friendId;

/**
*/
public function __construct() {
parent::__construct();
}

/**
* Takes an associative array and creates a friend object.
*
Expand Down
9 changes: 1 addition & 8 deletions CRM/Mailing/BAO/BouncePattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ class CRM_Mailing_BAO_BouncePattern extends CRM_Mailing_DAO_BouncePattern {
*/
public static $_patterns = NULL;

/**
* Class constructor.
*/
public function __construct() {
parent::__construct();
}

/**
* Build the static pattern array.
*/
Expand Down Expand Up @@ -60,7 +53,7 @@ public static function buildPatterns() {
* @return array
* Tuple (bounce_type, bounce_reason)
*/
public static function &match(&$message) {
public static function match($message) {
// clean up $message and replace all white space by a single space, CRM-4767
$message = preg_replace('/\s+/', ' ', $message);

Expand Down