original_string: protected function _correctStrategy($loadable)
      {
          $config = $loadable->getConfig();
          $currentStrategy = isset($config['strategy']) ?
              $config['strategy'] :
              'join';
  
          if (!$loadable->canBeJoined() || $currentStrategy !== 'join') {
              return;
          }
  
          $config['strategy'] = Association::STRATEGY_SELECT;
          $loadable->setConfig($config);
          $loadable->setCanBeJoined(false);
      }
code: protected function _correctStrategy($loadable)
      {
          $config = $loadable->getConfig();
          $currentStrategy = isset($config['strategy']) ?
              $config['strategy'] :
              'join';
  
          if (!$loadable->canBeJoined() || $currentStrategy !== 'join') {
              return;
          }
  
          $config['strategy'] = Association::STRATEGY_SELECT;
          $loadable->setConfig($config);
          $loadable->setCanBeJoined(false);
      }
code_tokens: protected function _correctStrategy ( $ loadable ) { $ config = $ loadable -> getConfig ( ) ; $ currentStrategy = isset ( $ config [ 'strategy' ] ) ? $ config [ 'strategy' ] : 'join' ; if ( ! $ loadable -> canBeJoined ( ) || $ currentStrategy !== 'join' ) { return ; } $ config [ 'strategy' ] = Association :: STRATEGY_SELECT ; $ loadable -> setConfig ( $ config ) ; $ loadable -> setCanBeJoined ( false ) ; }
docstring: Changes the association fetching strategy if required because of duplicate
  under the same direct associations chain
  
  @param \Cake\ORM\EagerLoadable $loadable The association config
  @return void
docstring_tokens: Changes the association fetching strategy if required because of duplicate under the same direct associations chain