Accessing entries in a matrix field in plugin
I think I've figured out how to do this now (mainly through trial and error).
The code above should actually be like this:

foreach ($matrixBlocks as $block) {

    foreach ($block-&gt;blockContent as $blockContent) {
        ....
    }
    foreach ($block-&gt;blockDependency as $blockDependency){
        ....
    }
}


And the the $blockContent and $blockDependency variables will contain the entries required.