1 | <?php |
||
10 | abstract class Publisher implements PublisherInterface |
||
11 | { |
||
12 | /** |
||
13 | * The name of component will used. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $component; |
||
18 | |||
19 | /** |
||
20 | * The components repository instance. |
||
21 | * |
||
22 | * @var \Consigliere\Components\Repository |
||
23 | */ |
||
24 | protected $repository; |
||
25 | |||
26 | /** |
||
27 | * The laravel console instance. |
||
28 | * |
||
29 | * @var \Illuminate\Console\Command |
||
30 | */ |
||
31 | protected $console; |
||
32 | |||
33 | /** |
||
34 | * The success message will displayed at console. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $success; |
||
39 | |||
40 | /** |
||
41 | * The error message will displayed at console. |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $error = ''; |
||
46 | |||
47 | /** |
||
48 | * Determine whether the result message will shown in the console. |
||
49 | * |
||
50 | * @var bool |
||
51 | */ |
||
52 | protected $showMessage = true; |
||
53 | |||
54 | /** |
||
55 | * The constructor. |
||
56 | * |
||
57 | * @param Component $component |
||
58 | */ |
||
59 | public function __construct(Component $component) |
||
63 | |||
64 | /** |
||
65 | * Show the result message. |
||
66 | * |
||
67 | * @return self |
||
68 | */ |
||
69 | public function showMessage() |
||
75 | |||
76 | /** |
||
77 | * Hide the result message. |
||
78 | * |
||
79 | * @return self |
||
80 | */ |
||
81 | public function hideMessage() |
||
87 | |||
88 | /** |
||
89 | * Get component instance. |
||
90 | * |
||
91 | * @return \Consigliere\Components\Component |
||
92 | */ |
||
93 | public function getComponent() |
||
97 | |||
98 | /** |
||
99 | * Set components repository instance. |
||
100 | * |
||
101 | * @param \Consigliere\Components\Repository $repository |
||
102 | * |
||
103 | * @return $this |
||
104 | */ |
||
105 | public function setRepository(Repository $repository) |
||
111 | |||
112 | /** |
||
113 | * Get components repository instance. |
||
114 | * |
||
115 | * @return \Consigliere\Components\Repository |
||
116 | */ |
||
117 | public function getRepository() |
||
121 | |||
122 | /** |
||
123 | * Set console instance. |
||
124 | * |
||
125 | * @param \Illuminate\Console\Command $console |
||
126 | * |
||
127 | * @return $this |
||
128 | */ |
||
129 | public function setConsole(Command $console) |
||
135 | |||
136 | /** |
||
137 | * Get console instance. |
||
138 | * |
||
139 | * @return \Illuminate\Console\Command |
||
140 | */ |
||
141 | public function getConsole() |
||
145 | |||
146 | /** |
||
147 | * Get laravel filesystem instance. |
||
148 | * |
||
149 | * @return \Illuminate\Filesystem\Filesystem |
||
150 | */ |
||
151 | public function getFilesystem() |
||
155 | |||
156 | /** |
||
157 | * Get destination path. |
||
158 | * |
||
159 | * @return string |
||
160 | */ |
||
161 | abstract public function getDestinationPath(); |
||
162 | |||
163 | /** |
||
164 | * Get source path. |
||
165 | * |
||
166 | * @return string |
||
167 | */ |
||
168 | abstract public function getSourcePath(); |
||
169 | |||
170 | /** |
||
171 | * Publish something. |
||
172 | */ |
||
173 | public function publish() |
||
197 | } |
||
198 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..