<?php
 namespace League\OAuth2\Client\Tool; use BadMethodCallException; trait RequiredParameterTrait { private function checkRequiredParameter($name, array $params) { if (!isset($params[$name])) { throw new BadMethodCallException(sprintf( 'Required parameter not passed: "%s"', $name )); } } private function checkRequiredParameters(array $names, array $params) { foreach ($names as $name) { $this->checkRequiredParameter($name, $params); } } } 