1 | <?php |
||
21 | class TinkerShell |
||
22 | { |
||
23 | /** |
||
24 | * Lumen Console Kernel. |
||
25 | * @var \Laravel\Lumen\Console\Kernel |
||
26 | */ |
||
27 | protected $console; |
||
28 | |||
29 | /** |
||
30 | * PsySH Shell. |
||
31 | * @var Shell |
||
32 | */ |
||
33 | protected $shell; |
||
34 | |||
35 | /** |
||
36 | * artisan commands to include in the tinker shell. |
||
37 | * |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $commandWhiteList = [ |
||
41 | 'migrate', |
||
42 | ]; |
||
43 | |||
44 | /** |
||
45 | * @param Console $console |
||
46 | */ |
||
47 | public function __construct(Console $console) |
||
51 | |||
52 | /** |
||
53 | * Set files that should be included on shell. |
||
54 | * |
||
55 | * @param $include |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function setIncludes($include) |
||
64 | |||
65 | /** |
||
66 | * Get instance of the Shell. |
||
67 | * @return \Psy\Shell |
||
68 | */ |
||
69 | public function getShell() |
||
85 | |||
86 | /** |
||
87 | * Get an array of Laravel tailored casters. |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | protected function getCasters() |
||
99 | |||
100 | /** |
||
101 | * Get artisan commands to pass through to PsySH. |
||
102 | * |
||
103 | * @return array |
||
104 | */ |
||
105 | protected function getCommands() |
||
117 | |||
118 | /** |
||
119 | * Run the shell. |
||
120 | */ |
||
121 | public function run() |
||
125 | } |
||
126 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.