PHPCS fixes

This commit is contained in:
Benoît Burnichon
2015-07-13 12:34:19 +02:00
parent f5949cd9f4
commit 620425cbf9

View File

@@ -15,20 +15,17 @@ use Doctrine\DBAL\Driver\Statement;
class caption_field implements cache_cacheableInterface class caption_field implements cache_cacheableInterface
{ {
/** /**
*
* @var databox_field * @var databox_field
*/ */
protected $databox_field; protected $databox_field;
/** /**
*
* @var string * @var string
*/ */
protected $values; protected $values;
/** /**
* * @var record_adapter
* @var record
*/ */
protected $record; protected $record;
protected $app; protected $app;
@@ -36,12 +33,11 @@ class caption_field implements cache_cacheableInterface
protected static $localCache = []; protected static $localCache = [];
/** /**
*
* @param Application $app * @param Application $app
* @param databox_field $databox_field * @param databox_field $databox_field
* @param record_adapter $record * @param record_adapter $record
* *
* @return caption_field * @return $this
*/ */
public function __construct(Application $app, databox_field $databox_field, \record_adapter $record) public function __construct(Application $app, databox_field $databox_field, \record_adapter $record)
{ {
@@ -55,15 +51,11 @@ class caption_field implements cache_cacheableInterface
foreach ($rs as $row) { foreach ($rs as $row) {
$this->values[$row['id']] = new caption_Field_Value($this->app, $databox_field, $record, $row['id']); $this->values[$row['id']] = new caption_Field_Value($this->app, $databox_field, $record, $row['id']);
/** // Inconsistent, should not happen
* Inconsistent, should not happen
*/
if (! $databox_field->is_multi()) { if (! $databox_field->is_multi()) {
break; break;
} }
} }
return $this;
} }
protected function get_metadatas_ids() protected function get_metadatas_ids()
@@ -76,13 +68,11 @@ class caption_field implements cache_cacheableInterface
$connbas = $this->databox_field->get_connection(); $connbas = $this->databox_field->get_connection();
$sql = 'SELECT id FROM metadatas $sql = 'SELECT id FROM metadatas WHERE record_id = :record_id AND meta_struct_id = :meta_struct_id';
WHERE record_id = :record_id
AND meta_struct_id = :meta_struct_id';
$params = [ $params = [
':record_id' => $this->record->get_record_id() ':record_id' => $this->record->get_record_id(),
, ':meta_struct_id' => $this->databox_field->get_id() ':meta_struct_id' => $this->databox_field->get_id(),
]; ];
$stmt = $connbas->prepare($sql); $stmt = $connbas->prepare($sql);
@@ -96,7 +86,6 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
*
* @return record_adapter * @return record_adapter
*/ */
public function get_record() public function get_record()
@@ -105,8 +94,7 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
* * @return bool
* @return boolean
*/ */
public function is_required() public function is_required()
{ {
@@ -114,8 +102,7 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
* * @return bool
* @return boolean
*/ */
public function is_multi() public function is_multi()
{ {
@@ -123,8 +110,7 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
* * @return bool
* @return boolean
*/ */
public function is_readonly() public function is_readonly()
{ {
@@ -132,8 +118,7 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
* * @return $this
* @return caption_field
*/ */
public function delete() public function delete()
{ {
@@ -146,7 +131,6 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
*
* @param array $values * @param array $values
* @param string $separator * @param string $separator
* @return string * @return string
@@ -174,7 +158,6 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
*
* @return \caption_Field_Value[] * @return \caption_Field_Value[]
*/ */
public function get_values() public function get_values()
@@ -183,7 +166,6 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
*
* @param int $meta_id * @param int $meta_id
* @return array * @return array
*/ */
@@ -193,8 +175,8 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
* @param String $custom_separator * @param bool|string $custom_separator
* @param Boolean $highlightTheso * @param bool $highlight
* *
* @return mixed * @return mixed
*/ */
@@ -222,7 +204,6 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
*
* @return string * @return string
*/ */
public function get_name() public function get_name()
@@ -231,7 +212,6 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
*
* @return int * @return int
*/ */
public function get_meta_struct_id() public function get_meta_struct_id()
@@ -240,8 +220,7 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
* * @return bool
* @return boolean
*/ */
public function is_indexable() public function is_indexable()
{ {
@@ -249,7 +228,6 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
*
* @return databox_field * @return databox_field
*/ */
public function get_databox_field() public function get_databox_field()
@@ -258,7 +236,6 @@ class caption_field implements cache_cacheableInterface
} }
/** /**
*
* @param string $serialized_value * @param string $serialized_value
* @param string $separator * @param string $separator
* @return array * @return array
@@ -412,7 +389,7 @@ class caption_field implements cache_cacheableInterface
* @param mixed $value * @param mixed $value
* @param string $option * @param string $option
* @param int $duration * @param int $duration
* @return caption_field * @return $this
*/ */
public function set_data_to_cache($value, $option = null, $duration = 360000) public function set_data_to_cache($value, $option = null, $duration = 360000)
{ {
@@ -423,7 +400,7 @@ class caption_field implements cache_cacheableInterface
* Part of the cache_cacheableInterface * Part of the cache_cacheableInterface
* *
* @param string $option * @param string $option
* @return caption_field * @return $this
*/ */
public function delete_data_from_cache($option = null) public function delete_data_from_cache($option = null)
{ {