Skip to content

Commit

Permalink
Merge branch '2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gravitano committed May 9, 2015
2 parents e97bcbc + 3b6c51e commit f156edb
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 31 deletions.
11 changes: 9 additions & 2 deletions Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,18 @@ public function call($name, array $parameters = array())
*/
public function get($name, array $parameters = array())
{
if ($this->hasGroup($name)) return $this->callGroup($name, $parameters);
if ($this->hasGroup($name))
{
return $this->callGroup($name, $parameters);
}

if ($this->has($name))
{
$callback = $this->widgets[$name];

return $this->getCallback($callback, $parameters);
}

return null;
}

Expand Down Expand Up @@ -235,7 +239,10 @@ public function hasGroup($name)
*/
public function callGroup($name, $parameters = array())
{
if ( ! $this->hasGroup($name)) return null;
if ( ! $this->hasGroup($name))
{
return null;
}

$result = '';

Expand Down
5 changes: 4 additions & 1 deletion WidgetServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public function register()

$file = app_path('widgets.php');

if (file_exists($file)) include $file;
if (file_exists($file))
{
include $file;
}
});
}

Expand Down
60 changes: 32 additions & 28 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
{
"name": "pingpong/widget",
"description": "Simple Widget System for Laravel Framework",
"keywords": ["widget", "laravel", "pingpong"],
"license": "MIT",
"authors": [
{
"name": "Pingpong Labs",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3.0",
"illuminate/support": "5.0.*",
"illuminate/container": "5.0.*",
"illuminate/view": "5.0.*",
"illuminate/html": "5.0.*",
"illuminate/routing": "5.0.*"
},
"require-dev": {
"mockery/mockery": "~0.9",
"phpunit/phpunit": "~4"
},
"autoload": {
"psr-4": {
"Pingpong\\Widget\\": ""
}
},
"minimum-stability": "dev"
"name": "pingpong/widget",
"description": "Simple Widget System for Laravel Framework",
"keywords": [
"widget",
"laravel",
"pingpong"
],
"license": "MIT",
"authors": [
{
"name": "Pingpong Labs",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3.0",
"illuminate/support": "5.0.*",
"illuminate/container": "5.0.*",
"illuminate/view": "5.0.*",
"illuminate/html": "5.0.*",
"illuminate/routing": "5.0.*"
},
"require-dev": {
"mockery/mockery": "~0.9",
"phpunit/phpunit": "~4"
},
"autoload": {
"psr-4": {
"Pingpong\\Widget\\": ""
}
},
"minimum-stability": "stable"
}

0 comments on commit f156edb

Please sign in to comment.