Create contact information from a description.

@param Description $description The contact description.

@return ContactEntity
8682
public function create(Description $description)
    {
        return new ContactEntity(
            $description->getOptionalProperty('phone'),
            $description->getOptionalProperty('twitter'),
            $description->getOptionalProperty('facebook')
        );
    }
446003
protected function askQuestion(string $description, string $default)
    {
        $helper   = $this->getHelper('question');
        $question = new Question($description, $default);
        $answer   = $helper->ask($this->input, $this->output, $question);

        return $answer;
    }
231356
public function setDescription($description = null)
    {
        if ($this->getMajorProtocolVersion() == 2) {
            require_once 'Zend/Gdata/App/VersionException.php';
            throw new Zend_Gdata_App_VersionException('The setDescription ' .
                ' method is only supported in version 1 of the YouTube ' .
                'API.');
        } else {
            $this->_description = $description;
            return $this;
        }
    }
1154366
public function prepareDescriptionForPersist($description)
    {
        $description = html_entity_decode($description);
        $description = strip_tags($description);
        $description = filter_var($description, FILTER_SANITIZE_STRING);

        // remove the encoded blank chars
        $description = str_replace("\xc2\xa0",'',$description);

        $description = trim($description);
        return $description;
    }
536168
public function setDescription($description)
    {
        if (!$this->setHeaderFieldModel('Content-Description', $description)) {
            $this->headers->addTextHeader('Content-Description', $description);
        }

        return $this;
    }
1026600
public function description(string $description, int $maxLength = 250) : self
    {
        $description = trim(strip_tags($description));
        $description = preg_replace("/\r|\n/", '', $description);

        $length = mb_strlen($description);

        $description = mb_substr($description, 0, $maxLength);

        if (mb_strlen($description) < $length) {
            $description .= '...';
        }

        $this->forget('description');

        $this->tags[] = $this->createTag('description', $description);

        return $this;
    }
676176
public function create(Description $description)
    {
        return new CategoryEntity(
            new Identifier($description->getMandatoryProperty('id')),
            $description->getMandatoryProperty('name'),
            $this->getIconUrl($description),
            (bool)$description->getOptionalProperty('primary', false)
        );
    }
195766
public function field(string $key, $value = null, $description = null)
    {
        if ( ! $field = $this->fields->where('key', $key)->first()) {
            $this->fields->push(
                $field = $this->fields()->firstOrNew(compact('key'))
            );
        }

        $field->setDefaultValue($value);
        $field->setDefaultDescription($description);

        $field->save();

        return $field;
    }
494042
public function log($description = '')
    {
        $payload = [
            'user_id' => auth()->id(),
            'description' => $description,
            'request' => json_encode([
                'url' => request()->url(),
                'method' => request()->method(),
                'query' => request()->fullUrl(),
                'secure' => request()->secure(),
                'client_ip' => request()->ip(),
                'payload' => request()->all(),
            ]),
        ];

        return $this->model->create($payload);
    }
1009930
public function addBox($name, $description = null)
    {
        return $this->boxes[$name] = new Box($name, $description);
    }
1155697
protected function setDescription($description = null)
    {
        if ($description) {
            $description = strip_tags($description);
        }

        $this->description = $description;

        return $this;
    }
599787
public function getByDescription($description)
    {
        if (\is_scalar($description) && ! empty($description = Str::lower(trim((string) $description)))) {
            foreach ($this->items as $auto_category) {
                if (Str::contains(Str::lower($auto_category->getDescription()), $description)) {
                    return $auto_category;
                }
            }
        }
    }
82721
public function setDescription($description)
    {
        $stripURLRegex = "/((?<!=\")(http|ftp)+(s)?:\/\/[^<>()\s]+)/i";
        $description = preg_replace($stripURLRegex, '', $description);
        $description = strip_tags($description);
        $description = htmlentities($description);
        $description = str_replace(array('#', '@'), '', $description);
        $description = AnService::get('com:base.template.helper.text')->truncate($description, array('length' => 160));
        $description = trim($description);

        $this->_description = $description;
	}
892768
public function setDescription($description)
    {
        $tag = ($this->version == Eresus_Feed_Writer::ATOM) ? 'summary' : 'description';
        $this->addElement($tag, $description);
    }
15500
public static function defaultCommandFactory(Description $description)
    {
        return function (
            $name,
            array $args = [],
            GuzzleClientInterface $client
        ) use ($description) {

            $operation = null;

            if ($description->hasOperation($name)) {
                $operation = $description->getOperation($name);
            } else {
                $name = ucfirst($name);
                if ($description->hasOperation($name)) {
                    $operation = $description->getOperation($name);
                }
            }

            if (!$operation) {
                return null;
            }

            // this is the only line which is patched
            $args += ($operation->getData('defaults') ?: []);

            return new Command($operation, $args, clone $client->getEmitter());
        };
    }
1214602
private function getIconUrl(Description $description)
    {
        $icon = $description->getMandatoryProperty('icon');

        return sprintf('%s%s%s', $icon->getMandatoryProperty('prefix'), '88', $icon->getMandatoryProperty('suffix'));
    }
1148319
public function setProfessionalDescriptions($descriptions)
    {
        foreach ($descriptions as $description) {
            $description->setVariety($this);
        }
        $this->professional_descriptions = $descriptions;

        return $this;
    }