PHPCS fixing and avoid returns in some constructors

This commit is contained in:
Benoît Burnichon
2015-05-06 19:06:06 +02:00
parent 8f8030bb11
commit 4db591a12a
3 changed files with 14 additions and 105 deletions

View File

@@ -67,10 +67,9 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea
protected $app;
/**
*
* @param Application $app
* @param databox $databox
* @param media_subdef $media_subdef
* @return media_Permalink_Adapter
*/
protected function __construct(Application $app, databox $databox, media_subdef $media_subdef)
{
@@ -79,8 +78,6 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea
$this->media_subdef = $media_subdef;
$this->load();
return $this;
}
/**
@@ -297,7 +294,6 @@ class media_Permalink_Adapter implements media_Permalink_Interface, cache_cachea
}
/**
*
* @param Application $app
* @param databox $databox
* @param media_subdef $media_subdef

View File

@@ -138,9 +138,8 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
/**
* @param Application $app
* @param record_adapter $record
* @param type $name
* @param type $substitute
* @return media_subdef
* @param string $name
* @param bool $substitute
*/
public function __construct(Application $app, record_adapter $record, $name, $substitute = false)
{
@@ -150,8 +149,6 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
$this->load($substitute);
$this->generate_url();
return $this;
}
/**

View File

@@ -35,113 +35,32 @@ use Alchemy\Phrasea\Core\PhraseaTokens;
class record_adapter implements RecordInterface, cache_cacheableInterface
{
/**
*
* @var <type>
*/
protected $xml;
/**
*
* @var <type>
*/
protected $base_id;
/**
*
* @var <type>
*/
protected $record_id;
/**
*
* @var <type>
*/
protected $mime;
/**
*
* @var <type>
*/
protected $number;
/**
*
* @var <type>
*/
protected $status;
/**
*
* @var <type>
*/
protected $subdefs;
/**
*
* @var <type>
*/
protected $type;
/**
*
* @var <type>
*/
protected $sha256;
/**
*
* @var <type>
*/
protected $grouping;
/**
*
* @var <type>
*/
protected $duration;
/**
*
* @var databox
*/
/** @var databox */
protected $databox;
/**
*
* @var DateTime
*/
/** @var DateTime */
protected $creation_date;
/**
*
* @var string
*/
/** @var string */
protected $original_name;
/**
*
* @var Array
*/
/** @var array */
protected $technical_datas;
/**
*
* @var caption_record
*/
/** @var caption_record */
protected $caption_record;
/**
*
* @var string
*/
/** @var string */
protected $uuid;
/**
*
* @var DateTime
*/
/** @var DateTime */
protected $modification_date;
/** @var Application */
protected $app;
const CACHE_ORIGINAL_NAME = 'originalname';
@@ -154,13 +73,10 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
const CACHE_STATUS = 'status';
/**
*
* @param Application $app
* @param integer $sbas_id
* @param integer $record_id
* @param integer $number
*
* @return record_adapter
*/
public function __construct(Application $app, $sbas_id, $record_id, $number = null)
{
@@ -169,7 +85,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface
$this->number = (int) $number;
$this->record_id = (int) $record_id;
return $this->load();
$this->load();
}
protected function load()