Code Duplication    Length = 3-3 lines in 2 locations

eZ/Publish/Core/Repository/UserService.php 1 location

@@ 897-899 (lines=3) @@
894
    {
895
        $loadedUser = $this->loadUser($user->id);
896
897
        if ($userTokenUpdateStruct->hashKey !== null && (!is_string($userTokenUpdateStruct->hashKey) || empty($userTokenUpdateStruct->hashKey))) {
898
            throw new InvalidArgumentValue('hashKey', $userTokenUpdateStruct->hashKey, 'UserTokenUpdateStruct');
899
        }
900
901
        if ($userTokenUpdateStruct->time === null) {
902
            throw new InvalidArgumentValue('time', $userTokenUpdateStruct->time, 'UserTokenUpdateStruct');

eZ/Publish/Core/Repository/LocationService.php 1 location

@@ 512-514 (lines=3) @@
509
            throw new InvalidArgumentValue('priority', $locationUpdateStruct->priority, 'LocationUpdateStruct');
510
        }
511
512
        if ($locationUpdateStruct->remoteId !== null && (!is_string($locationUpdateStruct->remoteId) || empty($locationUpdateStruct->remoteId))) {
513
            throw new InvalidArgumentValue('remoteId', $locationUpdateStruct->remoteId, 'LocationUpdateStruct');
514
        }
515
516
        if ($locationUpdateStruct->sortField !== null && !$this->domainMapper->isValidLocationSortField($locationUpdateStruct->sortField)) {
517
            throw new InvalidArgumentValue('sortField', $locationUpdateStruct->sortField, 'LocationUpdateStruct');