Appends some CSS classes to textarea elements.

@param \Go\Aop\Intercept\MethodInvocation $invocation Invocation
@Around("execution(public Cake\View\Helper\FormHelper->textarea(*))")
@return bool Whether object invocation should proceed or not
490335
public function alterTextarea(MethodInvocation $invocation)
    {
        $helper = $invocation->getThis();
        list($fieldName, $options) = array_pad($invocation->getArguments(), 2, null);
        $options = (array)$options;
        $options = $this->_addClass($helper, $options, 'form-control');

        $this->_addTemplates($helper);
        $this->setProperty($invocation, 'arguments', [$fieldName, $options]);

        return $invocation->proceed();
    }
411883
public function invoke(MethodInvocation $invocation)
    {
        /** @var \Ytake\LaravelAspect\Annotation\LogExceptions $annotation */
        $annotation = $invocation->getMethod()->getAnnotation($this->annotation);
        try {
            $result = $invocation->proceed();
        } catch (\Exception $exception) {
            if ($exception instanceof $annotation->expect) {
                $logFormat = $this->logFormatter($annotation, $invocation);
                $logger = static::$logger;
                /** Monolog\Logger */
                $logFormat['context']['code'] = $exception->getCode();
                $logFormat['context']['error_message'] = $exception->getMessage();
                if ($logger instanceof LogManager) {
                    if (!is_null($annotation->driver)) {
                        $logger = $logger->driver($annotation->driver);
                    }
                    $logger->addRecord($logFormat['level'], $logFormat['message'], $logFormat['context']);
                }
            }
            throw $exception;
        }

        // @codeCoverageIgnoreStart
        return $result;
        // @codeCoverageIgnoreEnd
    }
260817
def check_invocation(node, type)
      args = sort_args_by_position(node.args,
                                   node.splat,
                                   node.keywords.values,
                                   node.kwarg_splat)

      check_commas_after_args(args, "#{type} arguments")
    end
30755
public function invoke(MethodInvocation $invocation)
    {
        /** @var \Ytake\LaravelAspect\Annotation\QueryLog $annotation */
        $annotation = $invocation->getMethod()->getAnnotation($this->annotation);
        $this->subscribeQueryLog();
        $result = $invocation->proceed();
        $logFormat = $this->queryLogFormatter($annotation, $invocation);
        $logger = static::$logger;
        if ($logger instanceof LogManager) {
            if (!is_null($annotation->driver)) {
                $logger = $logger->driver($annotation->driver);
            }
            $logger->addRecord($logFormat['level'], $logFormat['message'], $logFormat['context']);
        }
        $this->queryLogs = [];

        return $result;
    }
32097
protected void enqueue (final AbstractInvocation invocation) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "enqueue", invocation);

    barrier.pass(); // Block until allowed to pass
  
    // We need to ensure that the thread processing this queue does not change the "running" state before we decide whether a new
    // thread needs to be started or not so synchronize on "this"

    synchronized (this) {
      final boolean isEmpty = isEmpty(); // Remember whether queue is currently empty or not

      // Add the invocation to the queue

      synchronized (barrier) {
        queue.add(invocation);

        queueSize += invocation.getSize();

        // Check to see if the queue limits have been exceeded and the queue should now be locked

        if (queueSize >= maxQueueSize || (maxQueueMsgs > 0 && queue.size() >= maxQueueMsgs)) {
          barrier.lock();
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Locked the barrier: bytes="+queueSize+" ("+maxQueueSize+") msgs="+queue.size()+" ("+maxQueueMsgs+")");
        } else {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Leaving barrier unlocked: bytes="+queueSize+" ("+maxQueueSize+") msgs="+queue.size()+" ("+maxQueueMsgs+")");
        }
      }

      // If queue was previously empty we need to either prompt the existing processing thread or start a new thread to
      // process the new invocation request

      if (isEmpty) {
        if (running) { // A processing thread already exists for this queue so wake it up
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Notifying existing thread");
          notify();
        } else { // We need to start a new processing thread
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Starting a new thread");
          boolean interrupted = true;
          while (interrupted) {
            try {
              threadPool.execute(this);
              interrupted = false;
            } catch (InterruptedException e) {
              // No FFDC code needed
            }
          }
        }
      }
    } // synchronized (this)

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "enqueue");
  }
999210
protected boolean hasAnnotation(MethodInvocation invocation, Class<? extends Annotation> annoType) {
        if (hasAnnotationOnClass(invocation, annoType)) {
            return true;
        }
        if (hasAnnotationOnMethod(invocation, annoType)) {
            return true;
        }
        return false;
    }
859058
public function invoke(MethodInvocation $invocation)
    {
        /** @var \Ytake\LaravelAspect\Annotation\Loggable $annotation */
        $annotation = $invocation->getMethod()->getAnnotation($this->annotation);
        $start = microtime(true);
        $result = $invocation->proceed();
        $time = number_format(microtime(true) - $start, 15);
        $logFormat = $this->logFormatter($annotation, $invocation);
        $logger = static::$logger;
        if (!$annotation->skipResult) {
            $logFormat['context']['result'] = $result;
        }
        $logFormat['context']['time'] = $time;
        /** Monolog\Logger */
        if ($logger instanceof LogManager) {
            if (!is_null($annotation->driver)) {
                $logger = $logger->driver($annotation->driver);
            }
            $logger->addRecord($logFormat['level'], $logFormat['message'], $logFormat['context']);
        }

        return $result;
    }
1225524
public function argumentsOf(int $invocation = 1): array
    {
        if (isset($this->callHistory[$invocation - 1])) {
            return $this->callHistory[$invocation - 1];
        }

        $totalInvocations = $this->count();
        throw new MissingInvocation(sprintf(
                'Missing invocation #%d for %s, was %s.',
                $invocation,
                $this->name,
                ($totalInvocations === 0 ?
                        'never called' :
                        ('only called ' . ($totalInvocations === 1 ?
                            'once' : $totalInvocations . ' times')
                        )
                )
        ));
    }
624766
@Override
	public final void invoke() {
		if (index < inters.length)
			inters[index++].intercept(this);
		else if (index++ == inters.length)
			invocation.invoke();
	}
823735
public function invokeWith($arguments = [])
    {
        $this->closeRule();

        if (empty($this->rules)) {
            $defaultAnswerCallback = $this->defaultAnswerCallback;
            $defaultAnswerCallback($this);
            $this->closeRule();
        }

        if ($arguments instanceof Arguments) {
            $argumentsArray = $arguments->all();
        } else {
            $argumentsArray = $arguments;
            $arguments = new Arguments($arguments);
        }

        foreach ($this->rules as $rule) {
            if (
                $this->matcherVerifier
                    ->matches($rule->criteria(), $argumentsArray)
            ) {
                break;
            }
        }

        $answer = $rule->next();

        foreach ($answer->secondaryRequests() as $request) {
            $this->invoker->callWith(
                $request->callback(),
                $request->finalArguments($this->self, $arguments)
            );
        }

        $request = $answer->primaryRequest();

        return $this->invoker->callWith(
            $request->callback(),
            $request->finalArguments($this->self, $arguments)
        );
    }
1211365
public function afterCreate(
        TemplateEngineFactory $subject,
        TemplateEngineInterface $invocationResult
    ): TemplateEngineInterface {
        $storeCode = $this->storeManager->getStore()->getCode();
        if (
            $this->config->isEnabledLayoutDebug() &&
            $this->request->getParam('hints') &&
            $this->devHelper->isDevAllowed()
        ) {
            $showBlockHints = (
                $this->scopeConfig->getValue(
                    self::XML_PATH_DEBUG_TEMPLATE_HINTS_BLOCKS,
                    ScopeInterface::SCOPE_STORE,
                    $storeCode
                ) || $this->request->getParam('hints-block')
            );

            return $this->debugHintsFactory->create([
                'subject' => $invocationResult,
                'showBlockHints' => $showBlockHints,
            ]);
        }

        return $invocationResult;
    }
960734
public function add($method)
    {
        if (!$method instanceof MethodInterface) {
            throw new \InvalidArgumentException('This Method must be a instance of \ClassGeneration\MethodInterface');
        }
        if ($method->getName() === null) {
            $method->setName('method' . ($this->count() + 1));
        }

        parent::set($method->getName(), $method);
        return true;
    }
1106358
public function alterSelectbox(MethodInvocation $invocation)
    {
        $helper = $invocation->getThis();
        list($fieldName, $options, $attributes) = array_pad($invocation->getArguments(), 3, null);
        $options = $options === null ? [] : $options;
        $attributes = (array)$attributes;
        $attributes = $this->_addClass($helper, $attributes, 'form-control');

        $this->setProperty($invocation, 'arguments', [$fieldName, $options, $attributes]);

        return $invocation->proceed();
    }
1242235
protected function doInvoke(Invocation $invocation)
    {
        return (new Pipeline($this->container))
            ->send($invocation)
            ->through($this->middleware)
            ->then(function ($invocation) {
                return $this->invoker->invoke($invocation);
            });
    }
1152637
protected function fetchMethodArguments(MethodInvocation $invocation): array
    {
        $result         = [];
        $parameters     = $invocation->getMethod()->getParameters();
        $argumentValues = $invocation->getArguments();

        // Number of arguments can be less than number of parameters because of default values
        foreach ($parameters as $parameterIndex => $reflectionParameter) {
            $hasArgumentValue = \array_key_exists($parameterIndex, $argumentValues);
            $argumentValue    = $hasArgumentValue ? $argumentValues[$parameterIndex] : null;
            if (!$hasArgumentValue && $reflectionParameter->isDefaultValueAvailable()) {
                $argumentValue = $reflectionParameter->getDefaultValue();
            }
            $result[$reflectionParameter->name] = $argumentValue;
        }

        return $result;
    }
509447
public function invoke(MethodInvocation $invocation)
    {
        $ro = $invocation->proceed();
        if (! $ro instanceof ResourceObject) {
            throw new ReturnValueIsNotResourceObjectException(\get_class($invocation->getThis()));
        }

        if ($ro->code >= Code::BAD_REQUEST) {
            return $this;
        }

        foreach ($this->commands as $command) {
            $command->command($invocation, $ro);
        }

        return $ro;
    }
1094401
public function alterSubmit(MethodInvocation $invocation)
    {
        $helper = $invocation->getThis();
        list($caption, $options) = array_pad($invocation->getArguments(), 2, null);
        $options = (array)$options;
        $options = $this->_addClass($helper, $options, 'btn btn-primary');

        $this->_addTemplates($helper);
        $this->setProperty($invocation, 'arguments', [$caption, $options]);

        return $invocation->proceed();
    }