Adds indentation to the result.

@param boolean $force Force add a line break?
164837
private function indent($force = false)
    {
        if ($this->size || $force) {
            $this->result .= $this->break;
        }

        if ($this->size) {
            $this->result .= str_repeat(
                $this->char,
                $this->size * $this->level
            );
        }
    }
950152
public function append($lines, $newline = true, $indentOffset = 0)
    {
        $this->_buffer[] = trim($lines) ? ($this->_getIndentationString($indentOffset) . $lines) : $lines;
        if ($newline) {
            $this->_buffer[] = $this->newLineStr;
        }

        return $this;
    }
1100909
public function addRawFromAssocArray($lines, $indentation = 0)
	{
		foreach ($lines as $key => $value)
		{
			if (is_array($value))
			{
				$this->addLine($key . ': [', array("indentation"=>$indentation));
				$this->addRawFromAssocArray($value, $indentation + 1);
				$this->addLine(']', array("indentation"=>$indentation));
			}
			else
			{
				$this->addLine($key . ': ' . $value, array("indentation"=>$indentation));
			}
		}
	}
255936
function setStrokeColor($color, $force = false)
    {
        $new_color = array($color[0], $color[1], $color[2], isset($color[3]) ? $color[3] : null);

        if (!$force && $this->currentStrokeColor == $new_color) {
            return;
        }

        if (isset($new_color[3])) {
            $this->currentStrokeColor = $new_color;
            $this->addContent(vsprintf("\n%.3F %.3F %.3F %.3F K", $this->currentStrokeColor));
        } else {
            if (isset($new_color[2])) {
                $this->currentStrokeColor = $new_color;
                $this->addContent(vsprintf("\n%.3F %.3F %.3F RG", $this->currentStrokeColor));
            }
        }
    }
241343
public function execute(bool $force = false): void
	{
		if($force || $this->confirm('<yellow>Are you sure you want to reset your database?</yellow>'))
		{
			$this->nl();

			$this->rollback();

			return;
		}

		$this->nl();

		$this->write('Ok, no action was performed.');
	}
71719
public function appendLine($line, $indent = 0)
    {
        $this->content .= ($indent ? $this->makeIndent($indent) : $this->indentCache) . $line . $this->newline;
    }
512648
public static function escapeToken($token, $force = false)
    {
        $escaped = preg_replace(self::RE_SPECIALS, '\\\\\\0', $token);

        if ($force || preg_match('/ /', $escaped) || strlen($token) != strlen($escaped)) {
            return '"' . $escaped . '"';
        } else {
            return $escaped;
        }
    }
796041
public function render($force = false) {

        if(empty($this->html) || $force) {

            if($this->selected) {
                $this->attributes['selected'] = 'selected';
            }
            else {
                unset($this->attributes['selected']);
            }

            $this->attributes['value'] = $this->getValue();

            $attr = [];

            foreach($this->attributes as $k => $v) {
                $attr[] = sprintf('%s="%s"', $k, $v);
            }

            $this->html = sprintf(
				'<option %s>%s</option>',
                implode(' ', $attr),
				$this->getLabel()->getLabelText()
			);
		}

		return $this->html;

	}
702073
function setColor($color, $force = false) {
    $new_color = array($color[0], $color[1], $color[2], isset($color[3]) ? $color[3] : null);
    
    if (!$force && $this->currentColour == $new_color) return;
    
    if (isset($new_color[3])) {
      $this->currentColour = $new_color;
      $this->objects[$this->currentContents]['c'] .= vsprintf("\n%.3F %.3F %.3F %.3F k", $this->currentColour);
    }

    elseif (isset($new_color[2])) {
      $this->currentColour = $new_color;
      $this->objects[$this->currentContents]['c'] .= vsprintf("\n%.3F %.3F %.3F rg", $this->currentColour);
    }
  }
931382
static public function getColors( $force = FALSE ){
		if( !self::$colors || $force )
			self::$colors	= intval( `tput colors` );
		return self::$colors;

	}

	/**
	 *	...
	 *	@static		public
	 *	@access		public
	 *	@return		...
	 */
	static public function getHeight( $force = FALSE ){
		if( !self::$height || $force )
			self::$height	= intval( `tput lines` );
//			self::$height	= exec( 'tput lines' );
		return self::$height;
	}
845692
public function toggle(string $class, ?bool $force = null): bool
    {
        if ($force === null) {
            $classes = $this->getClasses();

            if (in_array($class, $classes, true)) {
                $this->remove($class);

                return false;
            }

            $this->add($class);

            return true;
        }

        if ($force === true) {
            $this->add($class);

            return true;
        }

        $this->remove($class);

        return false;
    }
115355
static public function getSize( $force = FALSE ){
/*		preg_match_all("/rows.([0-9]+);.columns.([0-9]+);/", strtolower(exec('stty -a |grep columns')), $output);
		if(sizeof($output) == 3) {
			self::$width	= $output[2][0];
			self::$height	= $output[1][0];
		}*/
		return (object) array(
			'colors'	=> self::getColors(),
			'height'	=> self::getHeight(),
			'width'		=> self::getWidth(),
		);
	}
1092108
public function leave(bool $force = false)
    {
        $url = $this->url.'/leave?'.http_build_query(['force' => $force]);

        return $this->curl->post($url);
    }
105391
function setColor($color, $force = false)
    {
        $new_color = array($color[0], $color[1], $color[2], isset($color[3]) ? $color[3] : null);

        if (!$force && $this->currentColor == $new_color) {
            return;
        }

        if (isset($new_color[3])) {
            $this->currentColor = $new_color;
            $this->addContent(vsprintf("\n%.3F %.3F %.3F %.3F k", $this->currentColor));
        } else {
            if (isset($new_color[2])) {
                $this->currentColor = $new_color;
                $this->addContent(vsprintf("\n%.3F %.3F %.3F rg", $this->currentColor));
            }
        }
    }
1298997
function setColor( $cmykArray, $force = 0 )
    {
        if ( $force || !$this->compareCMYK( $cmykArray, $this->currentColour ) )
        {
            $this->objects[$this->currentContents]['c'] .= "\n" .
                 sprintf( '%.3F', $cmykArray['c'] ) . ' ' . sprintf( '%.3F', $cmykArray['m'] ) . ' ' .
                 sprintf( '%.3F', $cmykArray['y'] ) . ' ' . sprintf( '%.3F', $cmykArray['k'] ) . ' k';
            $this->currentColour = $cmykArray;
        }
    }
1063527
protected function checkFiles($force = false) {
        $files = $this->getFiles();
        foreach ($files as $file) {
            $this->checkFile($file, $force);
        }
    }
1108671
public function drop($force = false)
    {
        $this->clearCache();
        
        $this->force = $force;

        return 'DROP TABLE ' . ($this->isForce() ? 'IF EXISTS ' : '') . '`' . $this->getCurrentTable()->getFullTableName() . '`;';
    }