original_string: public static function verify($categoryId = null, $forumId = null, $threadId = null, $id = null)
      {
          if (!is_numeric($categoryId) || $categoryId < 1
                  || !is_numeric($forumId) || $forumId < 1
                  || !is_numeric($threadId) || $threadId < 1
                  || !is_numeric($id) || $id < 1) {
              return null;
          }
          return static::find()->joinWith(['thread', 'forum' => function ($query) use ($categoryId) {
                  $query->joinWith(['category'])->andWhere([Category::tableName() . '.id' => $categoryId]);
              }])->where([
                  static::tableName() . '.id' => $id,
                  static::tableName() . '.thread_id' => $threadId,
                  static::tableName() . '.forum_id' => $forumId,
              ])->limit(1)->one();
      }
code: public static function verify($categoryId = null, $forumId = null, $threadId = null, $id = null)
      {
          if (!is_numeric($categoryId) || $categoryId < 1
                  || !is_numeric($forumId) || $forumId < 1
                  || !is_numeric($threadId) || $threadId < 1
                  || !is_numeric($id) || $id < 1) {
              return null;
          }
          return static::find()->joinWith(['thread', 'forum' => function ($query) use ($categoryId) {
                  $query->joinWith(['category'])->andWhere([Category::tableName() . '.id' => $categoryId]);
              }])->where([
                  static::tableName() . '.id' => $id,
                  static::tableName() . '.thread_id' => $threadId,
                  static::tableName() . '.forum_id' => $forumId,
              ])->limit(1)->one();
      }
code_tokens: public static function verify ( $ categoryId = null , $ forumId = null , $ threadId = null , $ id = null ) { if ( ! is_numeric ( $ categoryId ) || $ categoryId < 1 || ! is_numeric ( $ forumId ) || $ forumId < 1 || ! is_numeric ( $ threadId ) || $ threadId < 1 || ! is_numeric ( $ id ) || $ id < 1 ) { return null ; } return static :: find ( ) -> joinWith ( [ 'thread' , 'forum' => function ( $ query ) use ( $ categoryId ) { $ query -> joinWith ( [ 'category' ] ) -> andWhere ( [ Category :: tableName ( ) . '.id' => $ categoryId ] ) ; } ] ) -> where ( [ static :: tableName ( ) . '.id' => $ id , static :: tableName ( ) . '.thread_id' => $ threadId , static :: tableName ( ) . '.forum_id' => $ forumId , ] ) -> limit ( 1 ) -> one ( ) ; }
docstring: Returns the verified post.
  @param int $categoryId post category ID
  @param int $forumId post forum ID
  @param int $threadId post thread ID
  @param int $id post ID
  @return Post
  @since 0.2
docstring_tokens: Returns the verified post .