Browse Source

Fix strict warnings running command test generator script.

Daniele Alessandri 12 years ago
parent
commit
1c21fcc5b3
1 changed files with 4 additions and 2 deletions
  1. 4 2
      bin/generate-command-test.php

+ 4 - 2
bin/generate-command-test.php

@@ -116,7 +116,8 @@ class CommandTestCaseGenerator
             return $this->options['realm'];
         }
 
-        $class = array_pop(explode('\\', $this->options['fqn']));
+        $fqnParts = explode('\\', $this->options['fqn']);
+        $class = array_pop($fqnParts);
         list($realm,) = preg_split('/([[:upper:]][[:lower:]]+)/', $class, 2, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
 
         return strtolower($realm);
@@ -152,7 +153,8 @@ class CommandTestCaseGenerator
     {
         $id = $instance->getId();
         $fqn = get_class($instance);
-        $class = array_pop(explode('\\', $fqn)) . "Test";
+        $fqnParts = explode('\\', $fqn);
+        $class = array_pop($fqnParts) . "Test";
         $realm = $this->getTestRealm();
 
         $buffer =<<<PHP