diff --git a/src/applications/diffusion/controller/home/DiffusionHomeController.php b/src/applications/diffusion/controller/home/DiffusionHomeController.php index bf816fb50f..448c9f316e 100644 --- a/src/applications/diffusion/controller/home/DiffusionHomeController.php +++ b/src/applications/diffusion/controller/home/DiffusionHomeController.php @@ -61,9 +61,9 @@ final class DiffusionHomeController extends DiffusionController { $repository = new PhabricatorRepository(); $repositories = $repository->loadAll(); - foreach ($repositories as $key => $repository) { - if (!$repository->isTracked()) { - unset($repositories[$key]); + foreach ($repositories as $key => $repo) { + if (!$repo->isTracked()) { + unset($repo[$key]); } } diff --git a/src/applications/diffusion/view/historytable/DiffusionHistoryTableView.php b/src/applications/diffusion/view/historytable/DiffusionHistoryTableView.php index 14e09dafcf..5183448e02 100644 --- a/src/applications/diffusion/view/historytable/DiffusionHistoryTableView.php +++ b/src/applications/diffusion/view/historytable/DiffusionHistoryTableView.php @@ -248,10 +248,10 @@ final class DiffusionHistoryTableView extends DiffusionView { // Try to find the other parent(s) in our existing threads. If we find // them, split to that thread. - foreach ($threads as $n => $thread_commit) { + foreach ($threads as $idx => $thread_commit) { if ($thread_commit == $parent) { $found = true; - $splits[] = $n; + $splits[] = $idx; } } diff --git a/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php b/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php index b497c4a509..b94dbd262f 100644 --- a/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php +++ b/src/applications/maniphest/view/transactiondetail/ManiphestTransactionDetailView.php @@ -266,9 +266,9 @@ final class ManiphestTransactionDetailView extends ManiphestView { PhabricatorPHIDConstants::PHID_TYPE_FILE, ); - foreach ($attach_types as $type) { - $old = array_keys(idx($old_raw, $type, array())); - $new = array_keys(idx($new_raw, $type, array())); + foreach ($attach_types as $attach_type) { + $old = array_keys(idx($old_raw, $attach_type, array())); + $new = array_keys(idx($new_raw, $attach_type, array())); if ($old != $new) { break; } @@ -285,7 +285,7 @@ final class ManiphestTransactionDetailView extends ManiphestView { } $links = implode("\n", $links); - switch ($type) { + switch ($attach_type) { case PhabricatorPHIDConstants::PHID_TYPE_DREV: $title = 'ATTACHED REVISIONS'; break; @@ -469,9 +469,9 @@ final class ManiphestTransactionDetailView extends ManiphestView { foreach (array( PhabricatorPHIDConstants::PHID_TYPE_DREV, PhabricatorPHIDConstants::PHID_TYPE_TASK, - PhabricatorPHIDConstants::PHID_TYPE_FILE) as $type) { - $old = array_keys(idx($old_raw, $type, array())); - $new = array_keys(idx($new_raw, $type, array())); + PhabricatorPHIDConstants::PHID_TYPE_FILE) as $attach_type) { + $old = array_keys(idx($old_raw, $attach_type, array())); + $new = array_keys(idx($new_raw, $attach_type, array())); if ($old != $new) { break; } @@ -483,7 +483,7 @@ final class ManiphestTransactionDetailView extends ManiphestView { $add_desc = $this->renderHandles($added); $rem_desc = $this->renderHandles($removed); - switch ($type) { + switch ($attach_type) { case PhabricatorPHIDConstants::PHID_TYPE_DREV: $singular = 'Differential Revision'; $plural = 'Differential Revisions'; diff --git a/src/infrastructure/celerity/controller/CelerityResourceController.php b/src/infrastructure/celerity/controller/CelerityResourceController.php index fac5a3c9fe..4ef21895f1 100644 --- a/src/infrastructure/celerity/controller/CelerityResourceController.php +++ b/src/infrastructure/celerity/controller/CelerityResourceController.php @@ -65,8 +65,8 @@ final class CelerityResourceController extends AphrontController { try { $data = array(); - foreach ($paths as $path) { - $data[] = Filesystem::readFile($root.'/webroot/'.$path); + foreach ($paths as $package_path) { + $data[] = Filesystem::readFile($root.'/webroot/'.$package_path); } $data = implode("\n\n", $data); } catch (Exception $ex) { diff --git a/src/view/control/table/AphrontTableView.php b/src/view/control/table/AphrontTableView.php index f48d8507b8..c958d95fc7 100644 --- a/src/view/control/table/AphrontTableView.php +++ b/src/view/control/table/AphrontTableView.php @@ -103,13 +103,13 @@ final class AphrontTableView extends AphrontView { public function render() { require_celerity_resource('aphront-table-view-css'); - $class = $this->className; - if ($class !== null) { - $class = ' class="aphront-table-view '.$class.'"'; + $table_class = $this->className; + if ($table_class !== null) { + $table_class = ' class="aphront-table-view '.$table_class.'"'; } else { - $class = ' class="aphront-table-view"'; + $table_class = ' class="aphront-table-view"'; } - $table = array(''); + $table = array(''); $col_classes = array(); foreach ($this->columnClasses as $key => $class) {