code: public function setAssetManager($assetManager)
      {
          if (is_scalar($assetManager)) {
              throw new Exception('"' . get_class($this) . '::assetManager" should be either object or array - "' . gettype($assetManager) . '" given.');
          }
          $this->_assetManager = $assetManager;
      }
docs: Sets asset manager instance or configuration.
  @param \yii\web\AssetManager|array $assetManager asset manager instance or its array configuration.
  @throws \yii\console\Exception on invalid argument type.