Si getter, retourner propriété. si setter, assigner valeur à une propriété

@param string $method
@param array $arguments
@return bool|void
@throws OrmException
350911
private function callGetterOrSetter(string $method, array $arguments)
    {
        $propertyWithUpper = lcfirst(substr($method, 3, mb_strlen($method)));
        $property = Str::convertCamelCaseToSnakeCase($propertyWithUpper);

        if (!property_exists(get_called_class(), $property)) {
            throw new OrmException('Property "'.$property.'" no exist.');

            return false;
        }

        if (substr($method, 0, 3) === 'get') {  // getter
            return $this->$property;
        }
        
        if (substr($method, 0, 3) === 'set') {  // setter
            $this->assignProperty($method, $property, $arguments[0]);
        }

        return;
    }
1150016
public function setMethod($method = '')
    {
        if (mb_strlen($method) == 0) {
            $this->debug->debug(__FUNCTION__, 'Set Default Method = GET if $method is does not exist');
            $method = 'GET';
        } else {
            $method       = strtoupper($method);
            $validMethods = [
                'GET',
                'HEAD',
                'PUT',
                'POST',
                'DELETE'
            ];
            if (!in_array($method, $validMethods)) {
                $message = "Error: " . __CLASS__ . ": The requested method (${method}) is not valid here";
                $this->debug->error(__FUNCTION__, $message);

                return $message;
            }
        }
        $this->method = $method;

        return $this;
    }
1101502
public function setMethod($method)
	{
		$method = strtolower($method);

		if (!array_key_exists($method, static::$methods)) {
			throw new \InvalidArgumentException("Method [$method] not a valid HTTP method.");
		}

		if ($this->data && !static::$methods[$method]) {
			throw new \LogicException('Request has POST data, but tried changing HTTP method to one that does not allow POST data');
		}

		$this->method = $method;

		return $this;
	}
749366
public function withMethod($method)
    {
        $method = strtoupper($method);

        if (false === in_array($method, ['GET', 'HEAD', 'POST', 'PUT', 'OPTIONS', 'DELETE'])) {
            throw new \InvalidArgumentException(
                sprintf('Invalid HTTP method: %s', $method)
            );
        }

        return $this->_clone('method', $method);
    }
1077360
public function setMethod($method)
    {
        $method = strtolower($method);
        if (!in_array($method, ['post', 'get'])) {
            throw new InvalidArgumentException(
                'Method must be "post" or "get"'
            );
        }
        $this->method = $method;

        return $this;
    }
230394
protected function setMethod($method)
    {
        if (! is_string($method)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid HTTP method provided. Must be a string; received "%s".',
                is_object($method) ? get_class($method) : gettype($method)
            ));
        }

        $restMethod = strtoupper($method);

        if (in_array($restMethod, $this->restMethods)) {
            $method = $restMethod;
        }
        $this->method = $method;

        return $this;
    }
1244536
public function apply($method, array $args = [])
    {
        $result = new Map;
        $this->walk(function ($object, $key) use ($method, $args, $result) {
            $result[$key] = call_user_func_array([$object, $method], $args);
        });
        return $result;
    }
323934
public function delegateMethodCall($method, array $arguments = [])
    {
        $config = $arguments['config'];

        if (isset($config['silent']) && $config['silent'] === true) {
            return $this->callFilesystemMethod($method, $arguments);
        }

        list($continue, $result) = $this->emitBefore($method, $arguments);

        if (! $continue) {
            return $result;
        }

        $result = $this->callFilesystemMethod($method, $result);

        return $this->emitAfter($method, $result, $arguments);
    }
232150
private function parse(string $method, ...$arguments)
    {
        if (null === $this->value) {
            return $this->default;
        }

        return self::$method($this->value, ...$arguments);
    }
5622
protected static function runCallback($method, $args)
	{
		$instance = static::resolveFacadeInstance();

		if(empty($args))
		{
			throw new InvalidArgumentException("Please provide an argument to this method");
			
		}

		switch (count($args))
		{
			case 0:
				return $instance->$method();

			case 1:
				return $instance->$method($args[0]);

			case 2:
				return $instance->$method($args[0], $args[1]);

			case 3:
				return $instance->$method($args[0], $args[1], $args[2]);

			case 4:
				return $instance->$method($args[0], $args[1], $args[2], $args[3]);

			default:
				return call_user_func_array(array($instance, $method), $args);
		}
	}
1176707
public function setMethod($method)
    {
        // Validate method is string
        if (is_string($method) === false) {
            throw new InvalidArgumentException(
                'Parameter "method" is not a string'
            );
        }

        // Valid method is not blank
        if ($method === '') {
            throw new InvalidArgumentException(
                'Parameter "method" cannot be blank'
            );
        }

        $this->method = $method;

        return $this;
    }
103499
protected function queueMacro($method, $args)
    {
        $result = $this->callMacro($method, $args);

        if ($result instanceof Buildable) {
            $this->queue($result);
        }

        return $result;
    }
464413
public function addCall(string $method, array $arguments = []): Service
    {
        $this->calls[$method] = $arguments;

        return $this;
    }
881260
public function invoke($object, $method, array $arguments = [])
    {
        $reflection = new \ReflectionClass($object);
        $method = $reflection->getMethod($method);
        $args = $this->resolveArguments($method, $arguments);

        return $method->invokeArgs($object, $args);
    }
49313
protected static function callMockOrParent(string $method, array $arguments)
    {
        $classToCall = 'parent';
        $class = get_called_class();
        $mock = static::$mock[$class] ?? null;

        if ($mock && $mock->mockery_getExpectationsFor($method)) {
            $classToCall = $mock;
        }

        return call_user_func_array([$classToCall, $method], $arguments);
    }
393898
public function notify($method, array $arguments = null)
    {
        $this->client->notify($method, $arguments);

        return $this;
    }
1278932
protected function maybeFail($method, $args) {
		$debug  = debug_backtrace(false);
		$orFail = $method.'OrFail';
		$func   = ($this->throwOnFind && $debug[2]['function'] != $orFail)? array($this, $orFail) : "parent::$method";
		return call_user_func_array($func, $args);
	}