Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Jul 16, 2018
1 parent 527a0a2 commit 775229a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/DI/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Helpers
public static function sort(array $definitions, int $default = 10): array
{
// Sort by priority
uasort($definitions, function (int $a, int $b) use ($default) {
uasort($definitions, function (array $a, array $b) use ($default) {
$p1 = $a['priority'] ?? $default;
$p2 = $b['priority'] ?? $default;

Expand Down
4 changes: 2 additions & 2 deletions src/DI/Plugin/PluginCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public function getPlugin(string $name): ?AbstractPlugin
{
$plugins = $this->manager->getPlugins();

return $plugins[$name] ?? null;
return $plugins[$name]['inst'] ?? null;
}

public function getPluginByType(string $class): ?AbstractPlugin
{
foreach ($this->manager->getPlugins() as $plugin) {
if (get_class($plugin['inst']) === $class) return $plugin;
if (get_class($plugin['inst']) === $class) return $plugin['inst'];
}

return null;
Expand Down
5 changes: 4 additions & 1 deletion src/Handler/ServiceCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ public function setArguments(array $args): void
$this->arguments = $args;
}

public function __invoke(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
/**
* @return mixed
*/
public function __invoke(ServerRequestInterface $request, ResponseInterface $response)
{
return call_user_func_array([$this->service, $this->method], $this->arguments);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Http/ApiResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function withEntity(AbstractEntity $entity): self
return $this->withAttribute(ResponseAttributes::ATTR_ENTITY, $entity);
}

public function getEndpoint(): Endpoint
public function getEndpoint(): ?Endpoint
{
return $this->getAttribute(ResponseAttributes::ATTR_ENDPOINT, null);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Schema/Builder/Controller/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function addGroupPath(string $path): void
$this->groupPaths[] = $path;
}

public function addTag(string $name, string $value): void
public function addTag(string $name, ?string $value): void
{
$this->tags[$name] = $value;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Schema/EndpointNegotiation.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function getRenderer(): ?string
return $this->renderer;
}

public function setRenderer(string $renderer): void
public function setRenderer(?string $renderer): void
{
$this->renderer = $renderer;
}
Expand Down

0 comments on commit 775229a

Please sign in to comment.