original_string: public function rule_bool($a)
      {
          // We don't use PHP inbuilt test - a bit restrictive
  
          // Changes PHP true/false to 1, 0
          $a = strtolower($a);
  
          $vals = array('true', 'false', 't', 'f', 1, 0, 'yes', 'no', 'y', 'n');
  
          if (!in_array($a, $vals)) {
              return $this->fail('Must be a boolean value');
          }
      }
code: public function rule_bool($a)
      {
          // We don't use PHP inbuilt test - a bit restrictive
  
          // Changes PHP true/false to 1, 0
          $a = strtolower($a);
  
          $vals = array('true', 'false', 't', 'f', 1, 0, 'yes', 'no', 'y', 'n');
  
          if (!in_array($a, $vals)) {
              return $this->fail('Must be a boolean value');
          }
      }
code_tokens: public function rule_bool ( $ a ) { // We don't use PHP inbuilt test - a bit restrictive // Changes PHP true/false to 1, 0 $ a = strtolower ( $ a ) ; $ vals = array ( 'true' , 'false' , 't' , 'f' , 1 , 0 , 'yes' , 'no' , 'y' , 'n' ) ; if ( ! in_array ( $ a , $ vals ) ) { return $ this -> fail ( 'Must be a boolean value' ) ; } }
docstring: Validate for true|false|t|f|1|0|yes|no|y|n.
  
  Normalizes to lower case
docstring_tokens: Validate for true|false|t|f|1|0|yes|no|y|n .