Skip to content

Commit b087110

Browse files
author
ndm2
committed
Cleanup - Unused local variables
1 parent e732f97 commit b087110

32 files changed

+27
-50
lines changed

src/Auth/DigestAuthenticate.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ public function getUser(Request $request) {
102102
return false;
103103
}
104104

105-
list(, $model) = pluginSplit($this->_config['userModel']);
106105
$user = $this->_findUser($digest['username']);
107106
if (empty($user)) {
108107
return false;

src/Cache/Engine/RedisEngine.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public function init(array $config = []) {
8787
* @return bool True if Redis server was connected
8888
*/
8989
protected function _connect() {
90-
$return = false;
9190
try {
9291
$this->_Redis = new \Redis();
9392
if (!empty($this->settings['unix_socket'])) {

src/Console/ConsoleIo.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ public function styles($style = null, $definition = null) {
269269
* @return mixed Either the default value, or the user-provided input.
270270
*/
271271
public function askChoice($prompt, $options, $default = null) {
272-
$originalOptions = $options;
273-
274272
if ($options && is_string($options)) {
275273
if (strpos($options, ',')) {
276274
$options = explode(',', $options);

src/Controller/Component/AuthComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ public function identify() {
721721
$result = $auth->authenticate($this->request, $this->response);
722722
if (!empty($result) && is_array($result)) {
723723
$this->_authenticationProvider = $auth;
724-
$event = $this->dispatchEvent('Auth.afterIdentify', [$result]);
724+
$this->dispatchEvent('Auth.afterIdentify', [$result]);
725725
return $result;
726726
}
727727
}

src/Controller/Component/RequestHandlerComponent.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,6 @@ public function respondAs($type, array $options = array()) {
578578
$options += $defaults;
579579

580580
$cType = $type;
581-
$request = $this->request;
582581
$response = $this->response;
583582
if (strpos($type, '/') === false) {
584583
$cType = $response->getMimeType($type);

src/Core/ClassLoader.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ protected function _loadMappedFile($prefix, $relativeClass) {
103103
}
104104

105105
foreach ($this->_prefixes[$prefix] as $baseDir) {
106-
$file = $baseDir .
107-
str_replace('\\', DIRECTORY_SEPARATOR, $relativeClass) . '.php';
108-
$file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php';
106+
$file = $baseDir . str_replace('\\', DIRECTORY_SEPARATOR, $relativeClass) . '.php';
109107

110108
if ($this->_requireFile($file)) {
111109
return $file;

src/Core/ObjectRegistry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ abstract class ObjectRegistry {
6666
* @return mixed
6767
*/
6868
public function load($objectName, $config = []) {
69-
list($plugin, $name) = pluginSplit($objectName);
69+
list(, $name) = pluginSplit($objectName);
7070
$loaded = isset($this->_loaded[$name]);
7171
if ($loaded && !empty($config)) {
7272
$this->_checkDuplicate($name, $config);
@@ -235,7 +235,7 @@ public function reset() {
235235
* @return void
236236
*/
237237
public function set($objectName, $object) {
238-
list($plugin, $name) = pluginSplit($objectName);
238+
list(, $name) = pluginSplit($objectName);
239239
$this->unload($objectName);
240240
if (isset($this->_eventManager)) {
241241
$this->eventManager()->attach($object);

src/Database/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public function compileQuery(Query $query, ValueBinder $generator) {
258258
public function run(Query $query) {
259259
$binder = $query->valueBinder();
260260
$binder->resetCount();
261-
list($query, $sql) = $this->driver()->compileQuery($query, $binder);
261+
list(, $sql) = $this->driver()->compileQuery($query, $binder);
262262

263263
$statement = $this->prepare($sql);
264264
$binder->attachTo($statement);

src/Event/EventManager.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ protected function _callListener(callable $listener, Event $event) {
280280
*/
281281
public function listeners($eventKey) {
282282
$localListeners = array();
283-
$priorities = array();
284283
if (!$this->_isGlobal) {
285284
$localListeners = $this->prioritisedListeners($eventKey);
286285
$localListeners = empty($localListeners) ? array() : $localListeners;

src/I18n/Parser/MoFileParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function parse($resource) {
8585
$messages = [];
8686

8787
for ($i = 0; $i < $count; $i++) {
88-
$singularId = $pluralId = null;
88+
$pluralId = null;
8989
$translated = null;
9090

9191
fseek($stream, $offsetId + $i * 8);

0 commit comments

Comments
 (0)