Skip to content

Commit

Permalink
Code cleanup from static analyzers and mixerapi/core version fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cnizzardini committed Dec 19, 2020
1 parent 57d9bcd commit 3687a6b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"phpdocumentor/reflection-docblock": "^5.1",
"doctrine/annotations": "^1.10",
"thecodingmachine/class-explorer": "^1.1",
"mixerapi/core": "~1.0"
"mixerapi/core": "^0.2"
},
"suggest": {
"friendsofcake/search": "Easy model searching with @SwagSearch",
Expand Down
2 changes: 0 additions & 2 deletions src/Lib/Model/ModelScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
use MixerApi\Core\Model\Model;
use MixerApi\Core\Model\ModelFactory;
use MixerApi\Core\Utility\NamespaceUtility;
use SwaggerBake\Lib\Annotation\SwagEntity;
use SwaggerBake\Lib\Configuration;
use SwaggerBake\Lib\Exception\SwaggerBakeRunTimeException;
use SwaggerBake\Lib\Route\RouteDecorator;
use SwaggerBake\Lib\Route\RouteScanner;
use SwaggerBake\Lib\Utility\AnnotationUtility;

/**
* Finds all Entities associated with RESTful routes based on userland configurations
Expand Down
8 changes: 5 additions & 3 deletions src/Lib/OpenApi/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
* @package SwaggerBake\Lib\OpenApi
* @see https://swagger.io/docs/specification/data-models/
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
*/
class Schema implements JsonSerializable
{
Expand Down Expand Up @@ -571,12 +572,13 @@ public function isVisible(): bool
}

/**
* @param bool $isVisible
* @return Schema
* @param bool $isVisible indicates visibility
* @return $this
*/
public function setIsVisible(bool $isVisible): Schema
public function setIsVisible(bool $isVisible)
{
$this->isVisible = $isVisible;

return $this;
}
}
1 change: 0 additions & 1 deletion src/Lib/Schema/SchemaFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class SchemaFactory
public function create(ModelDecorator $modelDecorator, int $propertyType = 6): Schema
{
$model = $modelDecorator->getModel();
/** @var SwagEntity $swagEntity */
$swagEntity = $this->getSwagEntityAnnotation($model->getEntity());

$this->validator = $this->getValidator($model);
Expand Down
1 change: 1 addition & 0 deletions src/Lib/Swagger.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* Class Swagger
*
* @package SwaggerBake\Lib
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
*/
class Swagger
{
Expand Down

0 comments on commit 3687a6b

Please sign in to comment.