Passed
Branch master (741916)
by Uni
04:04
created
Category
src/UK/DynamicProperties/ExplicitGetter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
     * @return mixed
36 36
     * @throws \LogicException If the property is unknown
37 37
     */
38
-   public function __get( $name )
38
+   public function __get($name)
39 39
    {
40 40
 
41
-      return $this->get( $name );
41
+      return $this->get($name);
42 42
 
43 43
    }
44 44
 
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
     * @param  string $name The name of the required property.
49 49
     * @return boolean
50 50
     */
51
-   public function __isset( $name )
51
+   public function __isset($name)
52 52
    {
53 53
 
54
-      return \method_exists( $this, 'get' . \ucfirst( $name ) );
54
+      return \method_exists($this, 'get'.\ucfirst($name));
55 55
 
56 56
    }
57 57
 
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
     * @param  string $getterName Returns the name of the associated get method, if method returns TRUE.
63 63
     * @return boolean
64 64
     */
65
-   public function hasReadableProperty( $name, &$getterName )
65
+   public function hasReadableProperty($name, &$getterName)
66 66
    {
67 67
 
68
-      $getterName = 'get' . \ucfirst( $name );
68
+      $getterName = 'get'.\ucfirst($name);
69 69
 
70
-      return \method_exists( $this, $getterName );
70
+      return \method_exists($this, $getterName);
71 71
 
72 72
    }
73 73
 
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
     * @param string $name
81 81
     * @return mixed
82 82
     */
83
-   protected function get( $name )
83
+   protected function get($name)
84 84
    {
85 85
 
86 86
       // The name of the required getMethod
87
-      if ( ! $this->hasReadableProperty( $name, $getterName ) )
87
+      if ( ! $this->hasReadableProperty($name, $getterName))
88 88
       {
89
-         throw new \LogicException( 'No such property: ' . __CLASS__ . '::$' . $name. '!' );
89
+         throw new \LogicException('No such property: '.__CLASS__.'::$'.$name.'!');
90 90
       }
91 91
 
92 92
       return $this->$getterName();
Please login to merge, or discard this patch.
src/UK/DynamicProperties/ExplicitGetterSetter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
     * @param  mixed  $value   The value to set.
38 38
     * @throws \LogicException Is thrown if the property does not exist or if writing is requested but not allowed.
39 39
     */
40
-   public function __set( $name, $value )
40
+   public function __set($name, $value)
41 41
    {
42 42
 
43
-      if ( ! $this->hasWritableProperty( $name, $setterName ) )
43
+      if ( ! $this->hasWritableProperty($name, $setterName))
44 44
       {
45
-         throw new \LogicException( 'No such property: ' . __CLASS__ . '::$' . $name. '!' );
45
+         throw new \LogicException('No such property: '.__CLASS__.'::$'.$name.'!');
46 46
       }
47 47
 
48
-      $this->$setterName( $value );
48
+      $this->$setterName($value);
49 49
 
50 50
    }
51 51
 
@@ -55,15 +55,15 @@  discard block
 block discarded – undo
55 55
     * @param  string $name The name of the required property.
56 56
     * @return boolean
57 57
     */
58
-   public function __isset( $name )
58
+   public function __isset($name)
59 59
    {
60 60
 
61
-      if ( \method_exists( $this, 'set' . \ucfirst( $name ) ) )
61
+      if (\method_exists($this, 'set'.\ucfirst($name)))
62 62
       {
63 63
          return true;
64 64
       }
65 65
 
66
-      return parent::__isset( $name );
66
+      return parent::__isset($name);
67 67
 
68 68
    }
69 69
 
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
     * @param  string $setterName Returns the name of the associated set method, if method returns TRUE.
75 75
     * @return boolean
76 76
     */
77
-   public function hasWritableProperty( $name, &$setterName )
77
+   public function hasWritableProperty($name, &$setterName)
78 78
    {
79 79
 
80
-      $setterName = 'set' . \ucfirst( $name );
80
+      $setterName = 'set'.\ucfirst($name);
81 81
 
82
-      return \method_exists( $this, $setterName );
82
+      return \method_exists($this, $setterName);
83 83
 
84 84
    }
85 85
 
Please login to merge, or discard this patch.