Skip to content

Commit d559226

Browse files
committed
Apply php-cs-fixer
Signed-off-by: Michal Čihař <[email protected]>
1 parent 1ef63fa commit d559226

15 files changed

+38
-30
lines changed

src/Components/GroupKeyword.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,5 @@ public static function build($component, array $options = array())
127127
}
128128

129129
return trim($component->expr);
130-
131130
}
132131
}

src/Components/IntoKeyword.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ class IntoKeyword extends Component
9898
/**
9999
* Constructor.
100100
*
101-
* @param string $type Type of destination (may be OUTFILE).
102-
* @param string|Expression $dest Actual destination.
103-
* @param array $columns Column list of destination.
104-
* @param array $values Selected fields.
105-
* @param OptionsArray $fields_options Options for FIELDS/COLUMNS keyword.
106-
* @param OptionsArray $fields_keyword Options for OPTINOS keyword.
101+
* @param string $type type of destination (may be OUTFILE)
102+
* @param string|Expression $dest actual destination
103+
* @param array $columns column list of destination
104+
* @param array $values selected fields
105+
* @param OptionsArray $fields_options options for FIELDS/COLUMNS keyword
106+
* @param OptionsArray $fields_keyword options for OPTINOS keyword
107107
*/
108108
public function __construct(
109109
$type = null,

src/Components/JoinKeyword.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ class JoinKeyword extends Component
7676
/**
7777
* Constructor.
7878
*
79-
* @param string $type Join type
80-
* @param Expression $expr Join expression.
81-
* @param Condition[] $on Join conditions.
82-
* @param ArrayObj $using Columns joined.
79+
* @param string $type Join type
80+
* @param Expression $expr join expression
81+
* @param Condition[] $on join conditions
82+
* @param ArrayObj $using columns joined
8383
*
8484
* @see JoinKeyword::$JOINS
8585
*/

src/Components/ParameterDefinition.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class ParameterDefinition extends Component
4545
/**
4646
* Constructor.
4747
*
48-
* @param string $name Parameter's name.
49-
* @param string $inOut Parameter's directional type (IN / OUT or None).
50-
* @param DataType $type Parameter's type.
48+
* @param string $name parameter's name
49+
* @param string $inOut parameter's directional type (IN / OUT or None)
50+
* @param DataType $type parameter's type
5151
*/
5252
public function __construct($name = null, $inOut = null, $type = null)
5353
{

src/Components/RenameOperation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class RenameOperation extends Component
3737
/**
3838
* Constructor.
3939
*
40-
* @param Expression $old Old expression.
41-
* @param Expression $new New expression containing new name.
40+
* @param Expression $old old expression
41+
* @param Expression $new new expression containing new name
4242
*/
4343
public function __construct($old = null, $new = null)
4444
{

src/Components/SetOperation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class SetOperation extends Component
3838
* Constructor.
3939
*
4040
* @param string $column Field's name..
41-
* @param string $value New value.
41+
* @param string $value new value
4242
*/
4343
public function __construct($column = null, $value = null)
4444
{

src/Context.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
namespace PhpMyAdmin\SqlParser;
1111

1212
use PhpMyAdmin\SqlParser\Exceptions\LoaderException;
13-
use PhpMyAdmin\SqlParser\Token;
1413

1514
/**
1615
* Holds the configuration of the context that is currently used.
@@ -309,10 +308,11 @@ public static function isWhitespace($str)
309308
* Checks if the given string is the beginning of a whitespace.
310309
*
311310
* @param string $str string to be checked
311+
* @param mixed $end
312312
*
313313
* @return int the appropriate flag for the comment type
314314
*/
315-
public static function isComment($str, $end=false)
315+
public static function isComment($str, $end = false)
316316
{
317317
$len = strlen($str);
318318
if ($len == 0) {

src/Exceptions/LoaderException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class LoaderException extends \Exception
2929
* @param string $ch the character that produced this exception
3030
* @param int $pos the position of the character
3131
* @param int $code the code of this error
32+
* @param mixed $name
3233
*/
3334
public function __construct($msg = '', $name = '', $code = 0)
3435
{

src/Lexer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ public function parseComment()
567567

568568
while (
569569
++$this->last < $this->len
570-
&& '0' <= $this->str[$this->last]
570+
&& $this->str[$this->last] >= '0'
571571
&& $this->str[$this->last] <= '9'
572572
) {
573573
$token .= $this->str[$this->last];
@@ -873,7 +873,7 @@ public function parseSymbol()
873873
}
874874
} elseif ($flags & Token::FLAG_SYMBOL_PARAMETER) {
875875
if ($this->last + 1 < $this->len) {
876-
$this->last++;
876+
++$this->last;
877877
}
878878
} else {
879879
$token = '';

src/UtfString.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function __construct($str)
7575
$this->byteIdx = 0;
7676
$this->charIdx = 0;
7777
$this->byteLen = mb_strlen($str, '8bit');
78-
if (! mb_check_encoding($str, 'UTF-8')) {
78+
if (!mb_check_encoding($str, 'UTF-8')) {
7979
$this->charLen = 0;
8080
} else {
8181
$this->charLen = mb_strlen($str, 'UTF-8');
@@ -120,7 +120,7 @@ public function offsetGet($offset)
120120
while ($delta++ < 0) {
121121
do {
122122
$byte = ord($this->str[--$this->byteIdx]);
123-
} while ((128 <= $byte) && ($byte < 192));
123+
} while (($byte >= 128) && ($byte < 192));
124124
--$this->charIdx;
125125
}
126126
}

0 commit comments

Comments
 (0)