File tree Expand file tree Collapse file tree 3 files changed +1
-66
lines changed Expand file tree Collapse file tree 3 files changed +1
-66
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,10 @@ class NonStringableObject extends LogicException implements ExceptionInterface
1515ERROR;
1616
1717 /**
18- * @param object $object
19- *
2018 * @return NonStringableObject
21- *
22- * @throws TypeError
2319 */
24- public static function fromAttemptedToString ($ object ) : self
20+ public static function fromAttemptedToString (object $ object ) : self
2521 {
26- if (! is_object ($ object )) {
27- throw TypeError::fromNonObject ($ object );
28- }
29-
3022 $ className = get_class ($ object );
3123
3224 return new self (sprintf (
Original file line number Diff line number Diff line change @@ -47,33 +47,4 @@ public function objectProvider() : array
4747 [$ this ],
4848 ];
4949 }
50-
51- /**
52- * @dataProvider nonObjectProvider
53- *
54- * @param mixed $nonObject
55- */
56- public function testWillThrowOnNonObject ($ nonObject ) : void
57- {
58- $ this ->expectException (TypeError::class);
59-
60- NonCallableObject::fromAttemptedCall ($ nonObject , 'propertyName ' );
61- }
62-
63- /**
64- * @return mixed[][]
65- */
66- public function nonObjectProvider () : array
67- {
68- return [
69- [null ],
70- [true ],
71- [123 ],
72- [12.3 ],
73- ['foo ' ],
74- [[]],
75- [STDERR ],
76- ];
77- }
78-
7950}
Original file line number Diff line number Diff line change @@ -47,32 +47,4 @@ public function objectProvider() : array
4747 [$ this ],
4848 ];
4949 }
50-
51- /**
52- * @dataProvider nonObjectProvider
53- *
54- * @param mixed $nonObject
55- */
56- public function testWillThrowOnNonObject ($ nonObject ) : void
57- {
58- $ this ->expectException (TypeError::class);
59-
60- NonStringableObject::fromAttemptedToString ($ nonObject );
61- }
62-
63- /**
64- * @return mixed[][]
65- */
66- public function nonObjectProvider () : array
67- {
68- return [
69- [null ],
70- [true ],
71- [123 ],
72- [12.3 ],
73- ['foo ' ],
74- [[]],
75- [STDERR ],
76- ];
77- }
7850}
You can’t perform that action at this time.
0 commit comments