Skip to content

Commit

Permalink
Remove private function
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Nov 3, 2019
1 parent 5075df8 commit 4abac7f
Showing 1 changed file with 6 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ public function process(File $phpcsFile, $stackPtr)
T_BOOLEAN_OR,
];

if ($this->allowOnly === 'first' || $this->allowOnly === 'last') {
$position = $this->allowOnly;
} else {
$position = null;
}

$operator = $parenOpener;
$position = $this->getDefaultPosition();
$error = false;
$operators = [];

Expand Down Expand Up @@ -191,22 +196,4 @@ public function process(File $phpcsFile, $stackPtr)
}//end process()


/**
* Default to null value if the option is not 'first' or 'last'
*
* @return string|null
*/
private function getDefaultPosition()
{
switch ($this->allowOnly) {
case 'first':
case 'last':
return $this->allowOnly;
default:
return null;
}

}//end getDefaultPosition()


}//end class

0 comments on commit 4abac7f

Please sign in to comment.