Skip to content

Commit 67baa44

Browse files
maickiAdlai Holler
authored andcommitted
Fix -Wdocumentation warnings (facebookarchive#3113)
1 parent 71ebf6b commit 67baa44

11 files changed

Lines changed: 30 additions & 40 deletions

Source/ASControlNode.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ @interface ASControlNode ()
5959
@abstract Enumerates the ASControlNode events included mask, invoking the block for each event.
6060
@param mask An ASControlNodeEvent mask.
6161
@param block The block to be invoked for each ASControlNodeEvent included in mask.
62-
@param anEvent An even that is included in mask.
6362
*/
6463
void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, void (^block)(ASControlNodeEvent anEvent));
6564

Source/ASDisplayNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ extern NSInteger const ASDefaultDrawingPriority;
752752
*
753753
* @param animated Animation is optional, but will still proceed through your `animateLayoutTransition` implementation with `isAnimated == NO`.
754754
* @param shouldMeasureAsync Measure the layout asynchronously.
755-
* @param measurementCompletion Optional completion block called only if a new layout is calculated.
755+
* @param completion Optional completion block called only if a new layout is calculated.
756756
* It is called on main, right after the measurement and before -animateLayoutTransition:.
757757
*
758758
* @discussion If the passed constrainedSize is the the same as the node's current constrained size, this method is noop. If passed YES to shouldMeasureAsync it's guaranteed that measurement is happening on a background thread, otherwise measaurement will happen on the thread that the method was called on. The measurementCompletion callback is always called on the main thread right after the measurement and before -animateLayoutTransition:.
@@ -773,7 +773,7 @@ extern NSInteger const ASDefaultDrawingPriority;
773773
*
774774
* @param animated Animation is optional, but will still proceed through your `animateLayoutTransition` implementation with `isAnimated == NO`.
775775
* @param shouldMeasureAsync Measure the layout asynchronously.
776-
* @param measurementCompletion Optional completion block called only if a new layout is calculated.
776+
* @param completion Optional completion block called only if a new layout is calculated.
777777
*
778778
* @see animateLayoutTransition:
779779
*

Source/ASDisplayNode.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,10 @@ - (void)_scheduleIvarsForMainDeallocation
466466
* up through ASDisplayNode, that we expect may need to be deallocated on main.
467467
*
468468
* This method caches its results.
469+
*
470+
* Result is of type NSValue<[Ivar]>
469471
*/
470-
+ (NSValue/*<[Ivar]>*/ * _Nonnull)_ivarsThatMayNeedMainDeallocation
472+
+ (NSValue * _Nonnull)_ivarsThatMayNeedMainDeallocation
471473
{
472474
static NSCache<Class, NSValue *> *ivarsCache;
473475
static dispatch_once_t onceToken;

Source/ASMultiplexImageNode.mm

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ - (void)_loadNextImage;
116116
@param imageIdentifier The identifier for the image to be fetched. May not be nil.
117117
@param imageURL The URL of the image to fetch. May not be nil.
118118
@param completionBlock The block to be performed when the image has been fetched from the cache, if possible. May not be nil.
119-
@param image The image fetched from the cache, if any.
120119
@discussion This method queries both the session's in-memory and on-disk caches (with preference for the in-memory cache).
121120
*/
122121
- (void)_fetchImageWithIdentifierFromCache:(id)imageIdentifier URL:(NSURL *)imageURL completion:(void (^)(UIImage *image))completionBlock;
@@ -127,8 +126,6 @@ - (void)_fetchImageWithIdentifierFromCache:(id)imageIdentifier URL:(NSURL *)imag
127126
@param imageIdentifier The identifier for the image to be loaded. May not be nil.
128127
@param assetURL The assets-library URL (e.g., "assets-library://identifier") of the image to load, from ALAsset. May not be nil.
129128
@param completionBlock The block to be performed when the image has been loaded, if possible. May not be nil.
130-
@param image The image that was loaded. May be nil if no image could be downloaded.
131-
@param error An error describing why the load failed, if it failed; nil otherwise.
132129
*/
133130
- (void)_loadALAssetWithIdentifier:(id)imageIdentifier URL:(NSURL *)assetURL completion:(void (^)(UIImage *image, NSError *error))completionBlock;
134131

@@ -137,8 +134,6 @@ - (void)_loadALAssetWithIdentifier:(id)imageIdentifier URL:(NSURL *)assetURL com
137134
@param imageIdentifier The identifier for the image to be loaded. May not be nil.
138135
@param request The photos image request to load. May not be nil.
139136
@param completionBlock The block to be performed when the image has been loaded, if possible. May not be nil.
140-
@param image The image that was loaded. May be nil if no image could be downloaded.
141-
@param error An error describing why the load failed, if it failed; nil otherwise.
142137
*/
143138
- (void)_loadPHAssetWithRequest:(ASPhotosFrameworkImageRequest *)request identifier:(id)imageIdentifier completion:(void (^)(UIImage *image, NSError *error))completionBlock;
144139
#endif
@@ -147,8 +142,6 @@ - (void)_loadPHAssetWithRequest:(ASPhotosFrameworkImageRequest *)request identif
147142
@param imageIdentifier The identifier for the image to be downloaded. May not be nil.
148143
@param imageURL The URL of the image to downloaded. May not be nil.
149144
@param completionBlock The block to be performed when the image has been downloaded, if possible. May not be nil.
150-
@param image The image that was downloaded. May be nil if no image could be downloaded.
151-
@param error An error describing why the download failed, if it failed; nil otherwise.
152145
*/
153146
- (void)_downloadImageWithIdentifier:(id)imageIdentifier URL:(NSURL *)imageURL completion:(void (^)(UIImage *image, NSError *error))completionBlock;
154147

Source/ASTableNode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ NS_ASSUME_NONNULL_BEGIN
463463
/**
464464
* Similar to -tableView:cellForRowAtIndexPath:.
465465
*
466-
* @param tableNode The sender.
466+
* @param tableView The sender.
467467
*
468468
* @param indexPath The index path of the requested node.
469469
*
@@ -552,7 +552,7 @@ NS_ASSUME_NONNULL_BEGIN
552552
/**
553553
* Receive a message that the tableView is near the end of its data set and more data should be fetched if necessary.
554554
*
555-
* @param tableView The sender.
555+
* @param tableNode The sender.
556556
* @param context A context object that must be notified when the batch fetch is completed.
557557
*
558558
* @discussion You must eventually call -completeBatchFetching: with an argument of YES in order to receive future
@@ -566,7 +566,7 @@ NS_ASSUME_NONNULL_BEGIN
566566
/**
567567
* Tell the tableView if batch fetching should begin.
568568
*
569-
* @param tableView The sender.
569+
* @param tableNode The sender.
570570
*
571571
* @discussion Use this method to conditionally fetch batches. Example use cases are: limiting the total number of
572572
* objects that can be fetched or no network connection.

Source/ASVideoNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ NS_ASSUME_NONNULL_BEGIN
110110
/**
111111
* @abstract Delegate method invoked when player playback time is updated.
112112
* @param videoNode The video node.
113-
* @param second current playback time in seconds.
113+
* @param timeInterval current playback time in seconds.
114114
*/
115115
- (void)videoNode:(ASVideoNode *)videoNode didPlayToTimeInterval:(NSTimeInterval)timeInterval;
116116
/**
117117
* @abstract Delegate method invoked when the video player stalls.
118118
* @param videoNode The video node that has experienced the stall
119-
* @param second Current playback time when the stall happens
119+
* @param timeInterval Current playback time when the stall happens
120120
*/
121121
- (void)videoNode:(ASVideoNode *)videoNode didStallAtTimeInterval:(NSTimeInterval)timeInterval;
122122
/**

Source/ASVideoPlayerNode.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,22 @@ NS_ASSUME_NONNULL_BEGIN
8080
@optional
8181
/**
8282
* @abstract Delegate method invoked before creating controlbar controls
83-
* @param videoPlayer
83+
* @param videoPlayer The sender
8484
*/
8585
- (NSArray *)videoPlayerNodeNeededDefaultControls:(ASVideoPlayerNode*)videoPlayer;
8686

8787
/**
8888
* @abstract Delegate method invoked before creating default controls, asks delegate for custom controls dictionary.
8989
* This dictionary must constain only ASDisplayNode subclass objects.
90-
* @param videoPlayer
90+
* @param videoPlayer The sender
9191
* @discussion - This method is invoked only when developer implements videoPlayerNodeLayoutSpec:forControls:forMaximumSize:
9292
* and gives ability to add custom constrols to ASVideoPlayerNode, for example mute button.
9393
*/
9494
- (NSDictionary *)videoPlayerNodeCustomControls:(ASVideoPlayerNode*)videoPlayer;
9595

9696
/**
9797
* @abstract Delegate method invoked in layoutSpecThatFits:
98-
* @param videoPlayer
98+
* @param videoPlayer The sender
9999
* @param controls - Dictionary of controls which are used in videoPlayer; Dictionary keys are ASVideoPlayerNodeControlType
100100
* @param maxSize - Maximum size for ASVideoPlayerNode
101101
* @discussion - Developer can layout whole ASVideoPlayerNode as he wants. ASVideoNode is locked and it can't be changed
@@ -107,10 +107,10 @@ NS_ASSUME_NONNULL_BEGIN
107107
#pragma mark Text delegate methods
108108
/**
109109
* @abstract Delegate method invoked before creating ASVideoPlayerNodeControlTypeElapsedText and ASVideoPlayerNodeControlTypeDurationText
110-
* @param videoPlayer
111-
* @param timeLabelType
110+
* @param videoPlayer The sender
111+
* @param timeLabelType The of the time label
112112
*/
113-
- (NSDictionary *)videoPlayerNodeTimeLabelAttributes:(ASVideoPlayerNode *)videoPlayerNode timeLabelType:(ASVideoPlayerNodeControlType)timeLabelType;
113+
- (NSDictionary *)videoPlayerNodeTimeLabelAttributes:(ASVideoPlayerNode *)videoPlayer timeLabelType:(ASVideoPlayerNodeControlType)timeLabelType;
114114
- (NSString *)videoPlayerNode:(ASVideoPlayerNode *)videoPlayerNode
115115
timeStringForTimeLabelType:(ASVideoPlayerNodeControlType)timeLabelType
116116
forTime:(CMTime)time;
@@ -136,7 +136,7 @@ NS_ASSUME_NONNULL_BEGIN
136136
#pragma mark ASVideoNodeDelegate proxy methods
137137
/**
138138
* @abstract Delegate method invoked when ASVideoPlayerNode is taped.
139-
* @param videoPlayerNode The ASVideoPlayerNode that was tapped.
139+
* @param videoPlayer The ASVideoPlayerNode that was tapped.
140140
*/
141141
- (void)didTapVideoPlayerNode:(ASVideoPlayerNode *)videoPlayer;
142142

@@ -148,23 +148,23 @@ NS_ASSUME_NONNULL_BEGIN
148148

149149
/**
150150
* @abstract Delegate method invoked when ASVideoNode playback time is updated.
151-
* @param videoPlayerNode The video player node
152-
* @param second current playback time.
151+
* @param videoPlayer The video player node
152+
* @param time current playback time.
153153
*/
154154
- (void)videoPlayerNode:(ASVideoPlayerNode *)videoPlayer didPlayToTime:(CMTime)time;
155155

156156
/**
157157
* @abstract Delegate method invoked when ASVideoNode changes state.
158-
* @param videoPlayerNode The ASVideoPlayerNode whose ASVideoNode is changing state.
158+
* @param videoPlayer The ASVideoPlayerNode whose ASVideoNode is changing state.
159159
* @param state ASVideoNode state before this change.
160-
* @param toSate ASVideoNode new state.
160+
* @param toState ASVideoNode new state.
161161
* @discussion This method is called after each state change
162162
*/
163163
- (void)videoPlayerNode:(ASVideoPlayerNode *)videoPlayer willChangeVideoNodeState:(ASVideoNodePlayerState)state toVideoNodeState:(ASVideoNodePlayerState)toState;
164164

165165
/**
166166
* @abstract Delegate method is invoked when ASVideoNode decides to change state.
167-
* @param videoPlayerNode The ASVideoPlayerNode whose ASVideoNode is changing state.
167+
* @param videoPlayer The ASVideoPlayerNode whose ASVideoNode is changing state.
168168
* @param state ASVideoNode that is going to be set.
169169
* @discussion Delegate method invoked when player changes it's state to
170170
* ASVideoNodePlayerStatePlaying or ASVideoNodePlayerStatePaused
@@ -188,7 +188,7 @@ NS_ASSUME_NONNULL_BEGIN
188188
/**
189189
* @abstract Delegate method invoked when the ASVideoNode stalls.
190190
* @param videoPlayer The video player node that has experienced the stall
191-
* @param second Current playback time when the stall happens
191+
* @param timeInterval Current playback time when the stall happens
192192
*/
193193
- (void)videoPlayerNode:(ASVideoPlayerNode *)videoPlayer didStallAtTimeInterval:(NSTimeInterval)timeInterval;
194194

Source/Debug/AsyncDisplayKit+Debug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
2121
* Enables an ASImageNode debug label that shows the ratio of pixels in the source image to those in
2222
* the displayed bounds (including cropRect). This helps detect excessive image fetching / downscaling,
2323
* as well as upscaling (such as providing a URL not suitable for a Retina device). For dev purposes only.
24-
* @param enabled Specify YES to show the label on all ASImageNodes with non-1.0x source-to-bounds pixel ratio.
24+
* Specify YES to show the label on all ASImageNodes with non-1.0x source-to-bounds pixel ratio.
2525
*/
2626
@property (class, nonatomic) BOOL shouldShowImageScalingOverlay;
2727

@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
3636
* edges that are clipped by the tappable area of any parent (their bounds + hitTestSlop) in the hierarchy = DARK GREEN BORDERED EDGE,
3737
* edges that are clipped by clipToBounds = YES of any parent in the hierarchy = ORANGE BORDERED EDGE (may still receive touches beyond
3838
* overlay rect, but can't be visualized).
39-
* @param enable Specify YES to make this debug feature enabled when messaging the ASControlNode class.
39+
* Specify YES to make this debug feature enabled when messaging the ASControlNode class.
4040
*/
4141
@property (class, nonatomic) BOOL enableHitTestDebug;
4242

Source/Details/ASImageProtocols.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ typedef void(^ASImageCacherCompletion)(id <ASImageContainerProtocol> _Nullable i
3030
@param URL The URL of the image to retrieve from the cache.
3131
@param callbackQueue The queue to call `completion` on.
3232
@param completion The block to be called when the cache has either hit or missed.
33-
@param imageFromCache The image that was retrieved from the cache, if the image could be retrieved; nil otherwise.
3433
@discussion If `URL` is nil, `completion` will be invoked immediately with a nil image. This method should not block
3534
the calling thread as it is likely to be called from the main thread.
3635
*/
@@ -51,7 +50,7 @@ typedef void(^ASImageCacherCompletion)(id <ASImageContainerProtocol> _Nullable i
5150
the calling thread to fetch the image from a fast memory cache. It is OK to return nil from this method and instead
5251
support only cachedImageWithURL:callbackQueue:completion: however, synchronous rendering will not be possible.
5352
*/
54-
- (nullable id <ASImageContainerProtocol>)synchronouslyFetchedCachedImageWithURL:(NSURL *)URL;
53+
- (nullable id <ASImageContainerProtocol>)synchronouslyFetchedCachedImageWithURL:(nullable NSURL *)URL;
5554

5655
/**
5756
@abstract Called during clearPreloadedData. Allows the cache to optionally trim items.
@@ -144,8 +143,7 @@ withDownloadIdentifier:(id)downloadIdentifier;
144143
@optional
145144

146145
/**
147-
@abstract Should be called when the objects cover image is ready.
148-
@param coverImageReadyCallback a block which receives the cover image.
146+
@abstract A block which receives the cover image. Should be called when the objects cover image is ready.
149147
*/
150148
@property (nonatomic, strong, readwrite) void (^coverImageReadyCallback)(UIImage *coverImage);
151149

Source/Private/ASBatchFetching.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ ASDISPLAYNODE_EXTERN_C_BEGIN
2828
@abstract Determine if batch fetching should begin based on the state of the parameters.
2929
@discussion This method is broken into a category for unit testing purposes and should be used with the ASTableView and
3030
* ASCollectionView batch fetching API.
31-
@param context The scroll view that in-flight fetches are happening.
31+
@param scrollView The scroll view that in-flight fetches are happening.
3232
@param scrollDirection The current scrolling direction of the scroll view.
3333
@param scrollableDirections The possible scrolling directions of the scroll view.
34-
@param targetOffset The offset that the scrollview will scroll to.
34+
@param contentOffset The offset that the scrollview will scroll to.
3535
@return Whether or not the current state should proceed with batch fetching.
3636
*/
3737
BOOL ASDisplayShouldFetchBatchForScrollView(UIScrollView<ASBatchFetchingScrollView> *scrollView, ASScrollDirection scrollDirection, ASScrollDirection scrollableDirections, CGPoint contentOffset);

0 commit comments

Comments
 (0)