original_string: protected function getDimensionsFromMode() : ?array
      {
          if (empty($output = $this->execute('mode CON'))) {
              return null;
          }
  
          if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $output, $matches)) {
              return [
                  'width' => (int) $matches[2],
                  'height'=> (int) $matches[1]
              ];
          }
  
          return null;
      }
code: protected function getDimensionsFromMode() : ?array
      {
          if (empty($output = $this->execute('mode CON'))) {
              return null;
          }
  
          if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $output, $matches)) {
              return [
                  'width' => (int) $matches[2],
                  'height'=> (int) $matches[1]
              ];
          }
  
          return null;
      }
code_tokens: protected function getDimensionsFromMode ( ) : ? array { if ( empty ( $ output = $ this -> execute ( 'mode CON' ) ) ) { return null ; } if ( preg_match ( '/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/' , $ output , $ matches ) ) { return [ 'width' => ( int ) $ matches [ 2 ] , 'height' => ( int ) $ matches [ 1 ] ] ; } return null ; }
docstring: Attempts to determine the Terminal's dimensions based on the result of a 'mode CON' system call.
  
  @return  array   Either an array containing two keys - 'width' and 'height' or null if the data couldn't
  be parsed to retrieve anything useful.
docstring_tokens: Attempts to determine the Terminal s dimensions based on the result of a mode CON system call .