Passed
Push — master ( ec0647...678d6d )
by dima
02:42
created
tests/bootstrap.php 2 patches
Doc Comments   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
     
6 6
     /**
7 7
      * получение защищенного свойства
8
-     * @param type $o
9
-     * @param type $name
8
+     * @param string $name
9
+     * @param SimpleORM\AbstractDataMapper $obj
10 10
      * @return type
11 11
      */
12 12
     static public function getProtectedAttribute($obj, $name)
@@ -19,8 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
     /**
21 21
      * Добавление значения в защищенное свойтсво
22
-     * @param type $name
23
-     * @param type $valued 
22
+     * @param string $name
23
+     * @param type $value
24
+     * @param SimpleORM\AbstractDataMapper $obj 
24 25
      */
25 26
     static public function setValueprotectedProperty($obj, $name, $value)
26 27
     {
@@ -30,6 +31,10 @@  discard block
 block discarded – undo
30 31
         $r->setValue($obj, $value); //изменяем значение
31 32
     }    
32 33
 	
34
+	/**
35
+	 * @param SimpleORM\AbstractDataMapper $obj
36
+	 * @param string $name
37
+	 */
33 38
 	static public function callMethod($obj, $name, array $args = []) {
34 39
         $class = new \ReflectionClass($obj);
35 40
         $method = $class->getMethod($name);
Please login to merge, or discard this patch.
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -3,38 +3,38 @@
 block discarded – undo
3 3
 
4 4
 class TestHelper{
5 5
     
6
-    /**
7
-     * получение защищенного свойства
8
-     * @param type $o
9
-     * @param type $name
10
-     * @return type
11
-     */
12
-    static public function getProtectedAttribute($obj, $name)
13
-    {
14
-        $reflectionClass = new \ReflectionClass($obj); //создаем reflectionClass
15
-        $r = $reflectionClass->getProperty($name); //получаем свойство
16
-        $r->setAccessible(true); //делаем открытым
17
-        return $r->getValue($obj);
18
-    }
6
+	/**
7
+	 * получение защищенного свойства
8
+	 * @param type $o
9
+	 * @param type $name
10
+	 * @return type
11
+	 */
12
+	static public function getProtectedAttribute($obj, $name)
13
+	{
14
+		$reflectionClass = new \ReflectionClass($obj); //создаем reflectionClass
15
+		$r = $reflectionClass->getProperty($name); //получаем свойство
16
+		$r->setAccessible(true); //делаем открытым
17
+		return $r->getValue($obj);
18
+	}
19 19
 
20
-    /**
21
-     * Добавление значения в защищенное свойтсво
22
-     * @param type $name
23
-     * @param type $valued 
24
-     */
25
-    static public function setValueprotectedProperty($obj, $name, $value)
26
-    {
27
-        $reflectionClass = new \ReflectionClass($obj); //создаем reflectionClass
28
-        $r = $reflectionClass->getProperty($name); //получаем свойство
29
-        $r->setAccessible(true); //делаем открытым
30
-        $r->setValue($obj, $value); //изменяем значение
31
-    }    
20
+	/**
21
+	 * Добавление значения в защищенное свойтсво
22
+	 * @param type $name
23
+	 * @param type $valued 
24
+	 */
25
+	static public function setValueprotectedProperty($obj, $name, $value)
26
+	{
27
+		$reflectionClass = new \ReflectionClass($obj); //создаем reflectionClass
28
+		$r = $reflectionClass->getProperty($name); //получаем свойство
29
+		$r->setAccessible(true); //делаем открытым
30
+		$r->setValue($obj, $value); //изменяем значение
31
+	}    
32 32
 	
33 33
 	static public function callMethod($obj, $name, array $args = []) {
34
-        $class = new \ReflectionClass($obj);
35
-        $method = $class->getMethod($name);
36
-        $method->setAccessible(true);
37
-        return $method->invokeArgs($obj, $args);
38
-    }	
34
+		$class = new \ReflectionClass($obj);
35
+		$method = $class->getMethod($name);
36
+		$method->setAccessible(true);
37
+		return $method->invokeArgs($obj, $args);
38
+	}	
39 39
     
40 40
 }
Please login to merge, or discard this patch.