renoki-co/php-k8s

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

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace RenokiCo\PhpK8s\Traits\Resource;

trait IsImmutable
{
    /**
     * Turn on the resource's immutable mode.
     *
     * @return $this
     */
    public function immutable()
    {
        return $this->setAttribute('immutable', true);
    }

    /**
     * Check if the resource is immutable.
     *
     * @return bool
     */
    public function isImmutable(): bool
    {
        return $this->getAttribute('immutable', false);
    }
}