<?php

namespace App\Traits;


trait ChecksIfPackingListIsComplete
{
    public function checkPackingListIsComplete(array $packages): bool {

        if(empty($packages)){
            return false;
        }

        foreach ($packages as $package) {
            if($package['width'] == 0 || $package['length'] == 0 || $package['height'] == 0 || $package['description'] == ''){
                return false;
            }
        }

        return true;
    }

}