Skip to content

Commit

Permalink
Update TinkerCaster.php
Browse files Browse the repository at this point in the history
  • Loading branch information
vluzrmos committed Mar 11, 2016
1 parent 61c49f8 commit 32fcdc1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/TinkerCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@ public static function castApplication(Application $app)
$results = [];
foreach (self::$appProperties as $property) {
try {
$val = $app->$property();
if (! is_null($val)) {
$results[Caster::PREFIX_VIRTUAL.$property] = $val;
}
if (method_exists($app, $property)) {
$val = $app->$property();

if (! is_null($val)) {
$results[Caster::PREFIX_VIRTUAL.$property] = $val;
}
}
} catch (Exception $e) {
//
}
Expand Down

0 comments on commit 32fcdc1

Please sign in to comment.