<?php
 namespace League\OAuth2\Client\Tool; trait GuardedPropertyTrait { protected $guarded = []; protected function fillProperties(array $options = []) { if (isset($options['guarded'])) { unset($options['guarded']); } foreach ($options as $option => $value) { if (property_exists($this, $option) && !$this->isGuarded($option)) { $this->{$option} = $value; } } } public function getGuarded() { return $this->guarded; } public function isGuarded($property) { return in_array($property, $this->getGuarded()); } } 