3
3
namespace Illuminate \Foundation \Console \Tinker \Casters ;
4
4
5
5
use Exception ;
6
- use Illuminate \Database \Eloquent \Model ;
7
- use Illuminate \Foundation \Application ;
8
6
use Illuminate \Support \Collection ;
9
- use Symfony \Component \VarDumper \Caster \Caster ;
7
+ use Illuminate \Foundation \Application ;
8
+ use Illuminate \Database \Eloquent \Model ;
10
9
use Symfony \Component \VarDumper \Cloner \Stub ;
10
+ use Symfony \Component \VarDumper \Caster \Caster ;
11
11
12
12
class FoundationCaster
13
13
{
14
14
/**
15
- * Illuminate Application methods to include in the presenter.
15
+ * Illuminate application methods to include in the presenter.
16
16
*
17
17
* @var array
18
18
*/
@@ -34,9 +34,9 @@ class FoundationCaster
34
34
];
35
35
36
36
/**
37
- * Get an array representing the properties of an Application object .
37
+ * Get an array representing the properties of an application .
38
38
*
39
- * @param Application $value
39
+ * @param \Illuminate\Foundation\ Application $app
40
40
* @param array $a
41
41
* @param Stub $stub
42
42
* @param bool $isNested
@@ -49,21 +49,22 @@ public static function castApplication(Application $app, array $a, Stub $stub, $
49
49
50
50
foreach (self ::$ appProperties as $ property ) {
51
51
try {
52
- $ val = $ value ->$ property ();
53
- if ( ! is_null ($ val )) {
52
+ $ val = $ app ->$ property ();
53
+ if (! is_null ($ val )) {
54
54
$ a [Caster::PREFIX_VIRTUAL . $ property ] = $ val ;
55
55
}
56
56
} catch (Exception $ e ) {
57
+ //
57
58
}
58
59
}
59
60
60
61
return $ a ;
61
62
}
62
63
63
64
/**
64
- * Get an array representing the properties of a Collection .
65
+ * Get an array representing the properties of a collection .
65
66
*
66
- * @param Collection $value
67
+ * @param \Illuminate\Support\ Collection $value
67
68
* @param array $a
68
69
* @param Stub $stub
69
70
* @param bool $isNested
@@ -78,9 +79,9 @@ public static function castCollection(Collection $coll, array $a, Stub $stub, $i
78
79
}
79
80
80
81
/**
81
- * Get an array representing the properties of a Model object .
82
+ * Get an array representing the properties of a model .
82
83
*
83
- * @param Application $value
84
+ * @param \Illuminate\Database\Eloquent\Model $model
84
85
* @param array $a
85
86
* @param Stub $stub
86
87
* @param bool $isNested
0 commit comments