Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Clean Code Deprecated Constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
leobouilloux committed Oct 27, 2015
1 parent 22be048 commit 0c76e0e
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion core/src/core/classes/class.AJXP_Utils.php
Expand Up @@ -991,7 +991,7 @@ public static function extractHooksToDoc()
*
* @return string Indented version of the original JSON string.
*/
public function prettyPrintJSON($json)
public static function prettyPrintJSON($json)
{
$result = '';
$pos = 0;
Expand Down
2 changes: 1 addition & 1 deletion core/src/core/classes/class.Repository.php
Expand Up @@ -151,7 +151,7 @@ public function getContentFilter()
* @param string $driver
* @return void
*/
public function Repository($id, $display, $driver)
public function __construct($id, $display, $driver)
{
$this->setAccessType($driver);
$this->setDisplay($display);
Expand Down
2 changes: 1 addition & 1 deletion core/src/core/classes/class.UserSelection.php
Expand Up @@ -50,7 +50,7 @@ class UserSelection
* @param Repository|null $repository
* @param array|null $httpVars
*/
public function UserSelection($repository = null, $httpVars = null)
public function __construct($repository = null, $httpVars = null)
{
$this->files = array();
if(isSet($repository)){
Expand Down
4 changes: 2 additions & 2 deletions core/src/core/classes/securimage/securimage.php
Expand Up @@ -503,7 +503,7 @@ class Securimage
* </code>
*
*/
public function Securimage()
public function __construct()
{
// Initialize session or attach to existing
if ( session_id() == '' ) { // no session has been started yet, which is needed for validation
Expand Down Expand Up @@ -1551,7 +1551,7 @@ class Securimage_Color
* @param $green int Green component 0-255
* @param $blue int Blue component 0-255
*/
public function Securimage_Color($red, $green = null, $blue = null)
public function __construct($red, $green = null, $blue = null)
{
if ($green == null && $blue == null && preg_match('/^#[a-f0-9]{3,6}$/i', $red)) {
$col = substr($red, 1);
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.fs/test.fsAccess.php
Expand Up @@ -28,7 +28,7 @@
*/
class fsAccessTest extends AbstractTest
{
public function fsAccessTest() { parent::__construct("Filesystem Plugin", ""); }
public function __construct() { parent::__construct("Filesystem Plugin", ""); }

/**
* Test Repository
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.ftp/test.ftpAccess.php
Expand Up @@ -28,7 +28,7 @@
*/
class ftpAccessTest extends AbstractTest
{
public function ftpAccessTest() { parent::__construct("Remote FTP Filesystem Plugin", ""); }
public function __construct() { parent::__construct("Remote FTP Filesystem Plugin", ""); }

public function doRepositoryTest($repo)
{
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.sftp_psl/phpseclib/SSH2.php
Expand Up @@ -758,7 +758,7 @@ class Net_SSH2
* @return Net_SSH2
* @access public
*/
function Net_SSH2($host, $port = 22, $timeout = 10)
function __construct($host, $port = 22, $timeout = 10)
{
// Include Math_BigInteger
// Used to do Diffie-Hellman key exchange and DSA/RSA signature verification.
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/conf.serial/class.AJXP_SerialUser.php
Expand Up @@ -50,9 +50,9 @@ class AJXP_SerialUser extends AbstractAjxpUser
* @param $id
* @param serialConfDriver $storage
*/
public function AJXP_SerialUser($id, $storage=null)
public function __construct($id, $storage=null)
{
parent::AbstractAjxpUser($id, $storage);
parent::__construct($id, $storage);
$this->registerForSave = array();
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/conf.sql/class.AJXP_SqlUser.php
Expand Up @@ -96,9 +96,9 @@ class AJXP_SqlUser extends AbstractAjxpUser
* @param $storage AbstractConfDriver User storage implementation.
* @return AJXP_SqlUser
*/
public function AJXP_SqlUser($id, $storage=null, $debugEnabled = false)
public function __construct($id, $storage=null, $debugEnabled = false)
{
parent::AbstractAjxpUser($id, $storage);
parent::__construct($id, $storage);
//$this->debugEnabled = true;

$this->log('Instantiating User');
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.conf/class.AbstractAjxpUser.php
Expand Up @@ -91,7 +91,7 @@ public function isHidden()
*/
public $storage;

public function AbstractAjxpUser($id, $storage=null)
public function __construct($id, $storage=null)
{
$this->id = $id;
if ($storage == null) {
Expand Down

0 comments on commit 0c76e0e

Please sign in to comment.