<commit_before><?php

/*
 * This file is part of the Symfony package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Console\Command;

use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Exception\RuntimeException;
use Symfony\Component\Filesystem\LockHandler;

/**
 * Basic lock feature for commands.
 *
 * @author <NAME> <<EMAIL>>
 */
trait LockableTrait
{
    private $lockHandler;

    /**
     * Locks a command.
     *
     * @return bool
     */
    private function lock($name = null, $blocking = false)
    {
        if (!class_exists(LockHandler::class)) {
            throw new RuntimeException('To enable the locking feature you must install the symfony/filesystem component.');
        }

        if (null !== $this->lockHandler) {
            throw new LogicException('A lock is already in place.');<commit_msg>update the author of the LockableTrait<commit_after><?php

/*
 * This file is part of the Symfony package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Console\Command;

use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Exception\RuntimeException;
use Symfony\Component\Filesystem\LockHandler;

/**
 * Basic lock feature for commands.
 *
 * @author <NAME> <<EMAIL>>
 */
trait LockableTrait
{
    private $lockHandler;

    /**
     * Locks a command.
     *
     * @return bool
     */
    private function lock($name = null, $blocking = false)
    {
        if (!class_exists(LockHandler::class)) {
            throw new RuntimeException('To enable the locking feature you must install the symfony/filesystem component.');
        }

        if (null !== $this->lockHandler) {
            throw new LogicException('A lock is already in place.');
{'fraction_non_alphanumeric': 0.11039921143420404, 'fraction_numerical': 0.0, 'mean_word_length': 3.142857142857143, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '3398309', 'n_tokens_mistral': 561, 'n_tokens_neox': 558, 'n_words': 180}