1 | <?php |
||
11 | class Salesforce extends \Stevenmaguire\OAuth2\Client\Provider\Salesforce |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | public $apiVersion = 'v20.0'; |
||
17 | |||
18 | /** |
||
19 | * Retrieves the currently configured provider api version. |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | public function getApiVersion() |
||
27 | |||
28 | /** |
||
29 | * Updates the provider api version with a given value. |
||
30 | * |
||
31 | * @throws InvalidArgumentException |
||
32 | * @param string $apiVersion |
||
33 | * @return Salesforce |
||
34 | */ |
||
35 | public function setApiVersion($apiVersion) |
||
47 | } |
||
48 |
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.
Unreachable code is most often the result of
return
,die
orexit
statements that have been added for debug purposes.In the above example, the last
return false
will never be executed, because a return statement has already been met in every possible execution path.