Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Parker committed Jul 22, 2022
2 parents d97f336 + 929522b commit bc40875
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 114 deletions.
10 changes: 5 additions & 5 deletions Config/InjectorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,39 +180,39 @@ private static function search(array $array, string|int $key, $default = null)
/**
* {@inheritDoc}
*/
public function count()
public function count(): int
{
return parent::count();
}

/**
* {@inheritDoc}
*/
public function offsetExists($index)
public function offsetExists(mixed $index): bool
{
return $this->has($index);
}

/**
* {@inheritDoc}
*/
public function offsetGet($index)
public function offsetGet(mixed $index): mixed
{
return $this->get($index);
}

/**
* {@inheritDoc}
*/
public function offsetSet($index, $newval)
public function offsetSet(mixed $index, mixed $newval): void
{
$this->add($index, $newval);
}

/**
* {@inheritDoc}
*/
public function offsetUnset($index)
public function offsetUnset(mixed $index): void
{
$this->remove($index);
}
Expand Down
2 changes: 1 addition & 1 deletion Config/Factory.php → Config/InjectorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace Qubus\Injector\Config;

class Factory
class InjectorFactory
{
public static function create(array $config = [], array $default = []): Config
{
Expand Down
8 changes: 1 addition & 7 deletions Injection.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,13 @@

class Injection
{
/**
* Alias that should be instantiated.
*/
private string $alias;

/**
* Instantiate an Injection object.
*
* @param string $alias Alias that should be instantiated.
*/
public function __construct(string $alias)
public function __construct(protected string $alias)
{
$this->alias = $alias;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion ServiceProvider/BaseServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class BaseServiceProvider implements Serviceable, Bootable
public function __construct(protected ServiceContainer $container)
{
}

/**
* {@inheritDoc}
*/
Expand Down
2 changes: 1 addition & 1 deletion StandardReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function getParamTypeHint(ReflectionFunctionAbstract $function, Reflectio
if (PHP_VERSION_ID >= 80000) {
$reflectionClass = $param->getType() ? (string) $param->getType() : null;
} else {
$reflectionClass = $param->getClass();
$reflectionClass = $param->getType();
if ($reflectionClass) {
$reflectionClass = $reflectionClass->getName();
}
Expand Down
Loading

0 comments on commit bc40875

Please sign in to comment.