]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/stacker/class_BaseStacker.php
Continued:
[core.git] / framework / main / classes / stacker / class_BaseStacker.php
index b352c2c55ae7c9e790e54959b688904eb59ae35f..12059306844f95399b1934ef806c7ea79db396ff 100644 (file)
@@ -54,7 +54,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @return      void
         * @throws      AlreadyInitializedStackerException      If the stack is already initialized
         */
-       public function initStack ($stackerName, $forceReInit = false) {
+       public function initStack (string $stackerName, bool $forceReInit = false) {
                // Is the stack already initialized?
                if (($forceReInit === false) && ($this->isStackInitialized($stackerName))) {
                        // Then throw the exception
@@ -70,7 +70,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         *
         * @return      void
         */
-       public function initStacks (array $stacks, $forceReInit = false) {
+       public function initStacks (array $stacks, bool $forceReInit = false) {
                // "Walk" through all (more will be added as needed
                foreach ($stacks as $stackerName) {
                        // Init this stack
@@ -84,7 +84,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @param       $stackerName    Name of the stack
         * @return      $isInitialized  Whether the stack is initialized
         */
-       public function isStackInitialized ($stackerName) {
+       public function isStackInitialized (string $stackerName) {
                // Is is there?
                $isInitialized = ($this->isValidGenericArrayKey('stacks', $stackerName, 'entries'));
 
@@ -99,7 +99,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @return      $isFull                 Whether the stack is full
         * @throws      NoStackerException      If given stack is missing
         */
-       protected function isStackFull ($stackerName) {
+       protected function isStackFull (string $stackerName) {
                // Is the stack not yet initialized?
                if (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
@@ -120,7 +120,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @return      $isEmpty                        Whether the stack is empty
         * @throws      NoStackerException      If given stack is missing
         */
-       public function isStackEmpty ($stackerName) {
+       public function isStackEmpty (string $stackerName) {
                // Is the stack not yet initialized?
                if (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
@@ -141,7 +141,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @return      $count                  Size of stack (array count)
         * @throws      NoStackerException      If given stack is missing
         */
-       public function getStackCount ($stackerName) {
+       public function getStackCount (string $stackerName) {
                // Is the stack not yet initialized?
                if (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
@@ -163,7 +163,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @return      void
         * @throws      FullStackerException    Thrown if the stack is full
         */
-       protected function addValue ($stackerName, $value) {
+       protected function addValue (string $stackerName, $value) {
                // Is the stack not yet initialized or full?
                if (!$this->isStackInitialized($stackerName)) {
                        // Then do it here
@@ -185,7 +185,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @throws      NoStackerException      If the named stacker was not found
         * @throws      EmptyStackerException   If the named stacker is empty
         */
-       protected function getLastValue ($stackerName) {
+       protected function getLastValue (string $stackerName) {
                // Is the stack not yet initialized or full?
                if (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
@@ -210,7 +210,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @throws      NoStackerException      If the named stacker was not found
         * @throws      EmptyStackerException   If the named stacker is empty
         */
-       protected function getFirstValue ($stackerName) {
+       protected function getFirstValue (string $stackerName) {
                // Is the stack not yet initialized or full?
                if (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
@@ -235,7 +235,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @throws      NoStackerException      If the named stacker was not found
         * @throws      EmptyStackerException   If the named stacker is empty
         */
-       protected function popLast ($stackerName) {
+       protected function popLast (string $stackerName) {
                // Is the stack not yet initialized or full?
                if (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception
@@ -257,7 +257,7 @@ abstract class BaseStacker extends BaseFrameworkSystem {
         * @throws      NoStackerException      If the named stacker was not found
         * @throws      EmptyStackerException   If the named stacker is empty
         */
-       protected function popFirst ($stackerName) {
+       protected function popFirst (string $stackerName) {
                // Is the stack not yet initialized or full?
                if (!$this->isStackInitialized($stackerName)) {
                        // Throw an exception