original_string: protected function checkSafeMode()
      {
          $safeMode = Config::get('cms.enableSafeMode', null);
          if ($safeMode === null) {
              $safeMode = !Config::get('app.debug', false);
          }
  
          if ($safeMode && $this->isDirty('code') && strlen(trim($this->code))) {
              throw new ApplicationException(Lang::get('cms::lang.cms_object.safe_mode_enabled'));
          }
      }
code: protected function checkSafeMode()
      {
          $safeMode = Config::get('cms.enableSafeMode', null);
          if ($safeMode === null) {
              $safeMode = !Config::get('app.debug', false);
          }
  
          if ($safeMode && $this->isDirty('code') && strlen(trim($this->code))) {
              throw new ApplicationException(Lang::get('cms::lang.cms_object.safe_mode_enabled'));
          }
      }
code_tokens: protected function checkSafeMode ( ) { $ safeMode = Config :: get ( 'cms.enableSafeMode' , null ) ; if ( $ safeMode === null ) { $ safeMode = ! Config :: get ( 'app.debug' , false ) ; } if ( $ safeMode && $ this -> isDirty ( 'code' ) && strlen ( trim ( $ this -> code ) ) ) { throw new ApplicationException ( Lang :: get ( 'cms::lang.cms_object.safe_mode_enabled' ) ) ; } }
docstring: This method checks if safe mode is enabled by config, and the code
  attribute is modified and populated. If so an exception is thrown.
  @return void
docstring_tokens: This method checks if safe mode is enabled by config and the code attribute is modified and populated . If so an exception is thrown .