Skip to content

Commit

Permalink
Cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Dec 8, 2018
1 parent 0e64d69 commit 4f404f4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/mako/application/cli/commands/migrations/Command.php
Expand Up @@ -184,7 +184,7 @@ protected function findMigrations(): array
* @param object $migration Migration
* @return string
*/
protected function getFullyQualifiedMigration($migration): string
protected function getFullyQualifiedMigration(object $migration): string
{
if(empty($migration->package))
{
Expand Down Expand Up @@ -303,7 +303,7 @@ protected function outputMigrationList(array $migrations)
* @param object $migration Migration meta
* @return \mako\database\migrations\Migration
*/
protected function resolve($migration): Migration
protected function resolve(object $migration): Migration
{
return $this->container->get($this->getFullyQualifiedMigration($migration));
}
Expand All @@ -317,7 +317,7 @@ protected function resolve($migration): Migration
* @param int|null $batch Migration batch
* @return \Closure
*/
protected function buildMigrationWrapper($migration, Migration $migrationInstance, string $method, ?int $batch = null): Closure
protected function buildMigrationWrapper(object $migration, Migration $migrationInstance, string $method, ?int $batch = null): Closure
{
return function() use ($migration, $migrationInstance, $method, $batch)
{
Expand All @@ -343,7 +343,7 @@ protected function buildMigrationWrapper($migration, Migration $migrationInstanc
* @param string $method Migration method
* @param int|null $batch Batch
*/
protected function runMigration($migration, string $method, ?int $batch = null)
protected function runMigration(object $migration, string $method, ?int $batch = null)
{
$migrationInstance = $this->resolve($migration);

Expand Down
4 changes: 2 additions & 2 deletions src/mako/database/midgard/Query.php
Expand Up @@ -302,10 +302,10 @@ public function excluding($excludes)
/**
* Returns a hydrated model.
*
* @param object $result Database result
* @param array $result Database result
* @return \mako\database\midgard\ORM
*/
protected function hydrateModel($result)
protected function hydrateModel(array $result)
{
$model = $this->model->getClass();

Expand Down
6 changes: 3 additions & 3 deletions src/mako/onion/Onion.php
Expand Up @@ -128,7 +128,7 @@ public function addOuterLayer(string $class, ?array $parameters = null): int
* @param object $object The object that we're decorating
* @return \Closure
*/
protected function buildCoreClosure($object): Closure
protected function buildCoreClosure(object $object): Closure
{
return function(...$arguments) use ($object)
{
Expand All @@ -145,7 +145,7 @@ protected function buildCoreClosure($object): Closure
* @param \Closure $next The next middleware layer
* @return \Closure
*/
protected function buildLayerClosure($layer, Closure $next): Closure
protected function buildLayerClosure(object $layer, Closure $next): Closure
{
return function(...$arguments) use ($layer, $next)
{
Expand Down Expand Up @@ -209,7 +209,7 @@ protected function middlewareFactory(string $middleware, array $parameters): obj
* @param array $middlewareParameters Middleware parameters
* @return mixed
*/
public function peel($object, array $parameters = [], array $middlewareParameters = [])
public function peel(object $object, array $parameters = [], array $middlewareParameters = [])
{
$next = $this->buildCoreClosure($object);

Expand Down
6 changes: 3 additions & 3 deletions src/mako/syringe/Container.php
Expand Up @@ -111,7 +111,7 @@ public function registerSingleton($hint, $class)
* @param string|array $hint Type hint or array contaning both type hint and alias
* @param object $instance Class instance
*/
public function registerInstance($hint, $instance)
public function registerInstance($hint, object $instance)
{
$this->instances[$this->parseHint($hint)] = $instance;
}
Expand Down Expand Up @@ -214,7 +214,7 @@ public function replaceSingleton(string $hint, $class)
* @param string $hint Type hint
* @param object $instance Class instance
*/
public function replaceInstance(string $hint, $instance)
public function replaceInstance(string $hint, object $instance)
{
$hint = $this->resolveAlias($hint);

Expand Down Expand Up @@ -388,7 +388,7 @@ protected function resolveParameters(array $reflectionParameters, array $provide
* @param object $class Class instance
* @return bool
*/
protected function isContainerAware($class): bool
protected function isContainerAware(object $class): bool
{
$traits = ClassInspector::getTraits($class);

Expand Down
2 changes: 1 addition & 1 deletion src/mako/validator/Validator.php
Expand Up @@ -407,7 +407,7 @@ protected function isInputFieldEmpty($value): bool
* @param object $parsedRule Parsed rule
* @return string
*/
protected function getErrorMessage(RuleInterface $rule, $field, $parsedRule): string
protected function getErrorMessage(RuleInterface $rule, string $field, object $parsedRule): string
{
$field = $this->getOriginalFieldName($field);

Expand Down

0 comments on commit 4f404f4

Please sign in to comment.