get( 'action', 'acquire' ); if ( $action === 'release' ) { $lockKey = $lock->create( $data->get( 'lockKey' ) ); if ( $lockKey ) { $lock->release(); } return Either::of( [ 'action' => 'release', 'result' => (bool) $lockKey ] ); } else { return Either::of( [ 'action' => 'acquire', 'result' => $lock->create( null ) ] ); } } }