Determine if the model or any of the given attribute(s) have been modified.

@param  array|string|null  $attributes
@return bool
329829
public function wasChanged($attributes = null)
    {
        return $this->hasChanges(
            $this->getChanges(), is_array($attributes) ? $attributes : func_get_args()
        );
    }
1195027
protected function contains(array $attributes = array())
    {
        $collection = $this->findAll();
        $filtered   = $collection->filter(function($value, $key) use($attributes) {
            foreach ($attributes as $keyname => $attrVal) {
                if ($value->{$keyname} != $attrVal) {
                    return false;
                }
            }
            return true;
        });
        return $filtered->count() > 0;
    }
957193
protected static function firstByAttributes($attributes)
	{
		$query = static::query();

		foreach ($attributes as $key => $value)
		{
			$query->where($key, $value);
		}

		return $query->first() ?: null;
	}
1047801
protected function determineModelName(array $attributes)
    {
        $keyName = $this->getTypeKeyName();

        return isset($attributes[$keyName]) ?
            $this->getModelDeterminer()->getMediaModelName($attributes[$keyName]) :
            $this->getModelDeterminer()->getDefaultMediaModelName();
    }
458013
public function setIdentityAttributes(array $attributes)
    {
        $allowedAttributes = $this->identityAttributesMap();
        foreach ($attributes as $name => $value) {
            if (isset($allowedAttributes[$name])) {
                $key = $allowedAttributes[$name];
                $this->$key = $value;
            }
        }

        return true;
    }
278517
public function getHashableString($attributes)
    {
        $string = null;
        if(!empty($this->hashableAttributes)) { // check if set
            foreach ($this->hashableAttributes as $value) {
                if(isset($attributes[$value])) $string .= $attributes[$value];
                else return null;
            }
        }
        return $string;
    }
159105
protected function isGranted($attributes, $object = null)
    {
        return $this->getContainer()->get('security.authorization_checker')->isGranted($attributes, $object);
    }
11404
public function isDirty($attributes = null): bool
    {
        $attributes = is_array($attributes) ? $attributes : func_get_args();

        if (parent::isDirty($attributes)) {
            return true;
        }

        foreach ($this->translationCache as $translation) {
            if ($translation->isDirty($attributes)) {
                return true;
            }
        }

        return false;
    }
48571
protected function filterAttributeValues(array $attributes)
    {
        return array_filter($attributes, function ($value) {
            if (is_array($value) && empty($value)) {
                return false;
            }

            return !($value === '' || $value === null);
        });
    }
1317029
public function isUnique($attribute, $params)
    {
        return null === self::find([
            'user_id' => $this->user_id,
            'provider' => $this->provider,
            'identifier' => $this->identifier,
        ]);
    }
424218
public function setAttributeArray(array $attributes = null)
    {
        if (!is_array($attributes) || empty($attributes)) {
            return;
        }

        foreach ($attributes as $name => $value) {
            $this->setAttribute($name, $value);
        }
    }
779555
public function setAttributes(array $attributes = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$attributes', $attributes, __NAMESPACE__ . '\Pair');

        $this->attributes = $attributes;

        return $this;
    }
414174
public function isValid(array $attributes = [])
    {
        try {
            if (!isset($attributes['validator'])) {
                return false;
            }
            $reflection = new ReflectionClass($attributes['validator']);

            if (!$reflection->hasMethod('__invoke')) {
                return false;
            }
            if (!in_array('Antares\Tester\Contracts\Tester', $reflection->getInterfaceNames())) {
                return false;
            }
        } catch (\Exception $e) {
            Log::emergency($e);
            return false;
        }
        return true;
    }
65381
protected function isEnctypeAttribute(&$_attributes)
    {
        if( isset($_attributes['enctype']) )
        {
            $enctype = $_attributes['enctype'];

            if( isset($this->enctypes[$enctype]) )
            {
                $_attributes['enctype'] = $this->enctypes[$enctype];
            }
        }
    }
947819
public function attributes($attributes = null)
    {
        if (null === $attributes) {
            return $this->attributes;
        }

        $this->attributes = $attributes;

        return $this;
    }
1320474
public function update(array $attributes = [])
    {
        $attributes = array_merge($attributes, ['ID' => $this->ID]);

        if (is_wp_error(wp_update_user($attributes))) {
            return false;
        }

        $this->setRawAttributes($attributes, true);

        return true;
    }
294079
public function update( array $attributes = [], array $options = [] )
    {
        if( ! $this->exists ) {
            return false;
        }
        $updated = $this->fill( $attributes )->save( $options );
        self::$lastUpdated = $this;
        return $updated;
    }