1 | <?php |
||
13 | class SocialProviderManager extends Manager implements Factory |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * SocialProviderManager constructor. |
||
18 | * |
||
19 | * @param \Illuminate\Foundation\Application $app |
||
20 | */ |
||
21 | public function __construct(\Illuminate\Foundation\Application $app) |
||
25 | |||
26 | /** |
||
27 | * Get the default driver name. |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | public function getDefaultDriver() |
||
35 | |||
36 | /** |
||
37 | * Create an instance of the "github" social provider driver. |
||
38 | * |
||
39 | */ |
||
40 | protected function createGithubDriver() |
||
44 | |||
45 | /** |
||
46 | * Create an instance of the "facebook" social provider driver. |
||
47 | * |
||
48 | */ |
||
49 | protected function createFacebookDriver() |
||
53 | |||
54 | /** |
||
55 | * Create an instance of the "google" social provider driver. |
||
56 | * |
||
57 | */ |
||
58 | protected function createGoogleDriver() |
||
62 | |||
63 | /** |
||
64 | * Create an instance of the "twitter" social provider driver. |
||
65 | * |
||
66 | */ |
||
67 | protected function createTwitterDriver() |
||
71 | |||
72 | /** |
||
73 | * Create an instance of the "linkedin" social provider driver. |
||
74 | * |
||
75 | */ |
||
76 | protected function createLinkedinDriver() |
||
80 | |||
81 | /** |
||
82 | * Build provider. |
||
83 | * |
||
84 | * @param $provider |
||
85 | * @return SocialProvider |
||
86 | */ |
||
87 | public function buildProvider($provider) |
||
91 | |||
92 | /** |
||
93 | * Get provider. |
||
94 | * |
||
95 | * @param $provider |
||
96 | * @return string |
||
97 | */ |
||
98 | private function getProvider($provider) |
||
102 | } |
||
103 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.