Fix code style [MAILPOET-489]
This commit is contained in:
@@ -182,9 +182,9 @@ class Newsletter extends Model {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function withSegments($inclDeleted = false) {
|
function withSegments($incl_deleted = false) {
|
||||||
$this->segments = $this->segments()->findArray();
|
$this->segments = $this->segments()->findArray();
|
||||||
if($inclDeleted) {
|
if($incl_deleted) {
|
||||||
$this->withDeletedSegments();
|
$this->withDeletedSegments();
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
@@ -201,18 +201,18 @@ class Newsletter extends Model {
|
|||||||
|
|
||||||
function withDeletedSegments() {
|
function withDeletedSegments() {
|
||||||
if(!empty($this->segments)) {
|
if(!empty($this->segments)) {
|
||||||
$segmentIds = Helpers::arrayColumn($this->segments, 'id');
|
$segment_ids = Helpers::arrayColumn($this->segments, 'id');
|
||||||
$links = $this->segmentLinks()
|
$links = $this->segmentLinks()
|
||||||
->whereNotIn('segment_id', $segmentIds)->findArray();
|
->whereNotIn('segment_id', $segment_ids)->findArray();
|
||||||
$deletedSegments = array();
|
$deleted_segments = array();
|
||||||
|
|
||||||
foreach($links as $link) {
|
foreach($links as $link) {
|
||||||
$deletedSegments[] = array(
|
$deleted_segments[] = array(
|
||||||
'id' => $link['segment_id'],
|
'id' => $link['segment_id'],
|
||||||
'name' => __('Deleted list', 'mailpoet')
|
'name' => __('Deleted list', 'mailpoet')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$this->segments = array_merge($this->segments, $deletedSegments);
|
$this->segments = array_merge($this->segments, $deleted_segments);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
Reference in New Issue
Block a user