Skip to content

Commit 2b18e4f

Browse files
committed
Fix cs
1 parent a1e916c commit 2b18e4f

7 files changed

+20
-17
lines changed

sami.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
$iterator = Finder::create()
1010
->files()
1111
->name('*.php')
12-
->in($dir);
12+
->in($dir)
13+
;
1314

1415
$versions = GitVersionCollection::create($dir)
15-
->addFromTags('v0.*')
16-
->add('master', 'master branch')
16+
->addFromTags('v0.*')
17+
->add('master', 'master branch')
1718
;
1819

1920
return new Sami($iterator, [

src/model/AbstractPhpStruct.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,17 @@ public function declareUses() {
171171
*
172172
* If the class has already been declared you get only the set alias.
173173
*
174-
* @param string $qualifiedName
175-
* @param null|string $alias
176-
* @return string the used alias
177-
*/
178-
public function declareUse($qualifiedName, $alias = null) {
179-
$qualifiedName = trim($qualifiedName, '\\');
180-
if (!$this->hasUseStatement($qualifiedName)) {
181-
$this->addUseStatement($qualifiedName, $alias);
182-
}
174+
* @param string $qualifiedName
175+
* @param null|string $alias
176+
* @return string the used alias
177+
*/
178+
public function declareUse($qualifiedName, $alias = null) {
179+
$qualifiedName = trim($qualifiedName, '\\');
180+
if (!$this->hasUseStatement($qualifiedName)) {
181+
$this->addUseStatement($qualifiedName, $alias);
182+
}
183183
return $this->getUseAlias($qualifiedName);
184-
}
184+
}
185185

186186
/**
187187
* Returns whether the given use statement is present

src/model/ConstantsInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function hasConstant($nameOrConstant);
5151
* @throws \InvalidArgumentException If the constant cannot be found
5252
* @return PhpConstant
5353
*/
54-
public function getConstant($name);
54+
public function getConstant($nameOrConstant);
5555

5656
/**
5757
* Returns constants

src/model/PhpConstant.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public static function create($name = null, $value = null) {
4343
*
4444
* @param string $name
4545
* @param mixed $value
46-
* @return static
4746
*/
4847
public function __construct($name = null, $value = null) {
4948
$this->setName($name);

src/model/PhpParameter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function isPassedByReference() {
123123
*/
124124
public function getDocblockTag() {
125125
return ParamTag::create()
126-
->setType($this->getType() ? : 'mixed')
126+
->setType($this->getType() ?: 'mixed')
127127
->setVariable($this->getName())
128128
->setDescription($this->getTypeDescription());
129129
}

src/visitor/GeneratorNavigator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private function visitStruct(GeneratorVisitorInterface $visitor, AbstractPhpStru
165165
* @return \Closure
166166
*/
167167
private function getConstantSortFunc() {
168-
return $this->constantSortFunc ? : 'strcasecmp';
168+
return $this->constantSortFunc ?: 'strcasecmp';
169169
}
170170

171171
/**

src/visitor/GeneratorVisitor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ protected function writeParameters(array $parameters) {
362362
}
363363
}
364364

365+
/**
366+
* @param string $type
367+
*/
365368
protected function writeFunctionReturnType($type) {
366369
if ($this->config->getGenerateReturnTypeHints() && $type != null && false === strpos($type, '|')) {
367370
$this->writer->write(': ')->write($type);

0 commit comments

Comments
 (0)