Skip to content

Commit

Permalink
Merge pull request #29 from phpspider/analysis-8nBE18
Browse files Browse the repository at this point in the history
Applied fixes from StyleCI
  • Loading branch information
Kapil committed Jan 29, 2016
2 parents 4f2c6c4 + 015d337 commit 8e9a1c6
Show file tree
Hide file tree
Showing 15 changed files with 878 additions and 873 deletions.
8 changes: 4 additions & 4 deletions config/config.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'useLaravelMessages' => true,
'plugin' => 'JqueryValidation',
'route' => 'laravalid'
];
'useLaravelMessages' => true,
'plugin' => 'JqueryValidation',
'route' => 'laravalid',
];
62 changes: 31 additions & 31 deletions src/Bllim/Laravalid/Converter/Base/Container.php
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<?php namespace Bllim\Laravalid\Converter\Base;
<?php

namespace Bllim\Laravalid\Converter\Base;

/**
* This container class brings to extended class extendibility and also base convert function
* This container class brings to extended class extendibility and also base convert function.
*
* @package Laravel Validation For Client-Side
* @author Bilal Gultekin <[email protected]>
* @license MIT
*
* @see Illuminate\Html\FormBuilder
*
* @version 0.9
*/

abstract class Container {

protected $customMethods = [];

public function convert($name, $parameters)
{
$methodName = strtolower($name);

if(isset($this->customMethods[$methodName]))
{
return call_user_func_array($this->customMethods[$methodName], $parameters);
}

if(method_exists($this, $methodName))
{
return call_user_func_array([$this, $methodName], $parameters);
}

return [];
}

public function extend($name, $function)
{
$this->customMethods[$name] = $function;
}

}
abstract class Container
{
protected $customMethods = [];

public function convert($name, $parameters)
{
$methodName = strtolower($name);

if (isset($this->customMethods[$methodName])) {
return call_user_func_array($this->customMethods[$methodName], $parameters);
}

if (method_exists($this, $methodName)) {
return call_user_func_array([$this, $methodName], $parameters);
}

return [];
}

public function extend($name, $function)
{
$this->customMethods[$name] = $function;
}
}
Loading

0 comments on commit 8e9a1c6

Please sign in to comment.