Skip to content

Commit 94dc571

Browse files
committed
add to elvis
1 parent eaa74a8 commit 94dc571

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

src/Console/Commands/DownloadWordPress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function exec()
3939
$path = $this->getArgument('path');
4040
$type = $this->getArgument('type');
4141
$this->type = $type ?: 'all';
42-
$this->path = rtrim( (string) ($path ? $path : Helper::wordPressRootPath()), '/');
42+
$this->path = rtrim( (string) ($path ?: Helper::wordPressRootPath()), '/');
4343

4444
switch($this->type) {
4545
case 'all' :

src/Elements/BaseForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ public function open( $attr = [], $request_params = [], $method = null)
631631
}
632632
}
633633

634-
$url = $this->formUrl ? $this->formUrl : (new Request)->getUriFull();
634+
$url = $this->formUrl ?: (new Request)->getUriFull();
635635

636636
$defaults = [
637637
'action' => Url::withQuery($url, $request_params),

src/Elements/Tabs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ protected function leftBoxedStyleTabs($classes = null)
433433
$icon = $this->getIcon($tab);
434434
$link_id = "tab-link-{$tab->getId()}";
435435
$url = $tab->getUrl();
436-
$panel_id = $url ? $url : "#tab-panel-{$tab->getId()}";
436+
$panel_id = $url ?: "#tab-panel-{$tab->getId()}";
437437
$data_uid = " data-uid=\"{$tab->getId()}\"";
438438
$desc = $tab->getDescription();
439439
$class .= $desc ? ' has-description': '';

src/Register/Page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ public function adminBar( $id, $title = null, $parent_id = 'site-name')
569569
'meta' => [
570570
'class' => 'custom-page-admin-bar-item',
571571
],
572-
'title' => $title ? $title : $this->getTitle(),
572+
'title' => $title ?: $this->getTitle(),
573573
'href' => $link
574574
]);
575575
}

src/Register/PostType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ public function getRootSlug()
701701
*/
702702
public function setRest( $rest_base = false, $controller = null )
703703
{
704-
$this->args['rest_base'] = $rest_base ? $rest_base : $this->id;
704+
$this->args['rest_base'] = $rest_base ?: $this->id;
705705
$this->args['show_in_rest'] = true;
706706
$controller ? $this->args['rest_controller_class'] = $controller : null;
707707

src/Register/Taxonomy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public function showPostTypeAdminColumn($bool = true)
437437
*/
438438
public function setRest( $rest_base = false, $controller = null )
439439
{
440-
$this->args['rest_base'] = $rest_base ? $rest_base : $this->id;
440+
$this->args['rest_base'] = $rest_base ?: $this->id;
441441
$this->args['show_in_rest'] = true;
442442
$controller ? $this->args['rest_controller_class'] = $controller : null;
443443

src/Utility/ModelField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function model(Model $model, $args)
3333
}
3434

3535
[$modifier, $arg1, $arg2] = array_pad(explode(':', ltrim($args, ':'), 3), 3, null);
36-
$name = $arg2 ? $arg2 : $arg1 ;
36+
$name = $arg2 ?: $arg1 ;
3737
$value = $model->getFieldValue($name);
3838

3939
switch($modifier) {

0 commit comments

Comments
 (0)