renoki-co/php-k8s

View on GitHub
src/Traits/Resource/HasStatus.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace RenokiCo\PhpK8s\Traits\Resource;

trait HasStatus
{
    /**
     * Get the status parameter with default.
     *
     * @param  string  $name
     * @param  mixed  $default
     * @return mixed
     */
    public function getStatus(string $name, $default = null)
    {
        return $this->getAttribute("status.{$name}", $default);
    }
}