Skip to content

Commit

Permalink
Fixed code style (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis authored Jan 21, 2024
1 parent 3345c6a commit f3eb61b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JBZoo / Mermaid-PHP

[![CI](https://github.com/JBZoo/Mermaid-PHP/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/Mermaid-PHP/actions/workflows/main.yml?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/JBZoo/Mermaid-PHP/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/Mermaid-PHP?branch=master) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/Mermaid-PHP/coverage.svg)](https://shepherd.dev/github/JBZoo/Mermaid-PHP) [![Psalm Level](https://shepherd.dev/github/JBZoo/Mermaid-PHP/level.svg)](https://shepherd.dev/github/JBZoo/Mermaid-PHP) [![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/mermaid-php/badge)](https://www.codefactor.io/repository/github/jbzoo/mermaid-php/issues)
[![CI](https://github.com/JBZoo/Mermaid-PHP/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/Mermaid-PHP/actions/workflows/main.yml?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/JBZoo/Mermaid-PHP/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/Mermaid-PHP?branch=master) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/Mermaid-PHP/coverage.svg)](https://shepherd.dev/github/JBZoo/Mermaid-PHP) [![Psalm Level](https://shepherd.dev/github/JBZoo/Mermaid-PHP/level.svg)](https://shepherd.dev/github/JBZoo/Mermaid-PHP) [![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/mermaid-php/badge)](https://www.codefactor.io/repository/github/jbzoo/mermaid-php/issues)
[![Stable Version](https://poser.pugx.org/jbzoo/mermaid-php/version)](https://packagist.org/packages/jbzoo/mermaid-php/) [![Total Downloads](https://poser.pugx.org/jbzoo/mermaid-php/downloads)](https://packagist.org/packages/jbzoo/mermaid-php/stats) [![Dependents](https://poser.pugx.org/jbzoo/mermaid-php/dependents)](https://packagist.org/packages/jbzoo/mermaid-php/dependents?order_by=downloads) [![GitHub License](https://img.shields.io/github/license/jbzoo/mermaid-php)](https://github.com/JBZoo/Mermaid-PHP/blob/master/LICENSE)


Expand Down
3 changes: 3 additions & 0 deletions src/ClassDiagram/ClassDiagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ public function render(): string
return \implode(\PHP_EOL, $result);
}

/**
* @suppress PhanPossiblyUndeclaredProperty
*/
public function getParams(): array
{
return \array_filter([
Expand Down
3 changes: 3 additions & 0 deletions src/ClassDiagram/Relationship/RelationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public function getDefaultLink(): Link
};
}

/**
* @psalm-suppress PossiblyNullOperand
*/
public function renderRelation(Link $link, ?RelationType $inverse): string
{
return match ($this) {
Expand Down
4 changes: 4 additions & 0 deletions src/ClassDiagram/Relationship/Relationship.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public function __toString(): string

private function renderRelation(): string
{
if ($this->link === null) {
return '';
}

return $this->relationType->renderRelation($this->link, $this->inverseRelationType);
}

Expand Down
2 changes: 1 addition & 1 deletion src/ERDiagram/Entity/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function renderProps(): ?string
$output = $this . ' {' . \PHP_EOL;

foreach ($props as $prop) {
/** @var \JBZoo\MermaidPHP\ERDiagram\Entity\EntityProperty $prop */
/** @var EntityProperty $prop */
$output .= $spaces . $spaces . $prop . \PHP_EOL;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Timeline/Timeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __toString(): string
}

/**
* @throws \JBZoo\MermaidPHP\Timeline\Exception\SectionHasNoTitleException
* @throws SectionHasNoTitleException
*/
public function addSection(self $section): self
{
Expand Down

0 comments on commit f3eb61b

Please sign in to comment.