-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from phpspider/analysis-8nBE18
Applied fixes from StyleCI
- Loading branch information
Showing
15 changed files
with
878 additions
and
873 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
Oops, something went wrong.