<commit_before><?php

namespace Thumbor\Url;

/**
 * Produces URL builders for a given server/secret combination. Useful when the
 * server/secret combination is consistent across your whole app. E.g.
 *
 *     // global variable
 *     $thumbnailUrlFactory = Thumbor\Url\BuilderFactory::construct(
 *         'http://thumbor.example.com',
 *         'secret'
 *     );
 *
 *     // elsewhere in your app
 *     echo $thumbnailUrlFactory
 *         ->urlFrom('http://example.com/llamas.jpg')
 *         ->fitIn(320, 240)
 *         // etc
 *         ;
 */
class BuilderFactory
{
    private $server;
    private $secret;

    public static function construct($server, $secret=null)
    {
        return new self($server, $secret);
    }

    public function __construct($server, $secret=null)
    {
        $this->server = $server;
        $this->secret = $secret;
    }

    public function url($original)
    {
        return Builder::construct($this->server, $this->secret, $original);
    }
}<commit_msg>Nette Frameworks in it's config file which generates DI Container is using annotations which are missing here.<commit_after><?php

namespace Thumbor\Url;

/**
 * Produces URL builders for a given server/secret combination. Useful when the
 * server/secret combination is consistent across your whole app. E.g.
 *
 *     // global variable
 *     $thumbnailUrlFactory = Thumbor\Url\BuilderFactory::construct(
 *         'http://thumbor.example.com',
 *         'secret'
 *     );
 *
 *     // elsewhere in your app
 *     echo $thumbnailUrlFactory
 *         ->urlFrom('http://example.com/llamas.jpg')
 *         ->fitIn(320, 240)
 *         // etc
 *         ;
 */
class BuilderFactory
{
    private $server;
    private $secret;

    /**
     * @param $server
     * @param null $secret
     * @return BuilderFactory
     */
    public static function construct($server, $secret=null)
    {
        return new self($server, $secret);
    }

    /**
     * BuilderFactory constructor.
     * @param $server
     * @param null $secret
     */
    public function __construct($server, $secret=null)
    {
        $this->server = $server;
        $this->secret = $secret;
    }

    /**
     * @param $original
     * @return Builder
     */
    public function url($original)
    {
        return Builder::construct($this->server, $this->secret, $original);
    }
}
{'fraction_non_alphanumeric': 0.130746520455504, 'fraction_numerical': 0.005061155630535639, 'mean_word_length': 2.2944444444444443, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4132464', 'n_tokens_mistral': 695, 'n_tokens_neox': 679, 'n_words': 172}