/var/www/html_uk/wp-content/plugins/automatewoo/includes/Jobs/Traits/ValidateItemAsIntegerId.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

namespace AutomateWoo\Jobs\Traits;

use 
AutomateWoo\Exceptions\InvalidArgument;
use 
AutomateWoo\Traits\IntegerValidator;

/**
 * Trait ValidateItemAsIntegerId
 *
 * @since 5.1.0
 */
trait ValidateItemAsIntegerId {

    use 
IntegerValidator;

    
/**
     * Validate an item.
     *
     * @param mixed $item
     *
     * @throws InvalidArgument If the item is not valid.
     */
    
protected function validate_item$item ) {
        
$this->validate_positive_integer$item );
    }
}