original_string: public static function getForDimension(Dimension $dimension)
      {
          $provider = new ReportsProvider();
          $reports = $provider->getAllReports();
          foreach ($reports as $report) {
              if (!$report->isSubtableReport()
                  && $report->getDimension()
                  && $report->getDimension()->getId() == $dimension->getId()
              ) {
                  return $report;
              }
          }
          return null;
      }
code: public static function getForDimension(Dimension $dimension)
      {
          $provider = new ReportsProvider();
          $reports = $provider->getAllReports();
          foreach ($reports as $report) {
              if (!$report->isSubtableReport()
                  && $report->getDimension()
                  && $report->getDimension()->getId() == $dimension->getId()
              ) {
                  return $report;
              }
          }
          return null;
      }
code_tokens: public static function getForDimension ( Dimension $ dimension ) { $ provider = new ReportsProvider ( ) ; $ reports = $ provider -> getAllReports ( ) ; foreach ( $ reports as $ report ) { if ( ! $ report -> isSubtableReport ( ) && $ report -> getDimension ( ) && $ report -> getDimension ( ) -> getId ( ) == $ dimension -> getId ( ) ) { return $ report ; } } return null ; }
docstring: Finds a top level report that provides stats for a specific Dimension.
  
  @param Dimension $dimension The dimension whose report we're looking for.
  @return Report|null The
  @api
docstring_tokens: Finds a top level report that provides stats for a specific Dimension .